| java.lang.Object | ||
| ↳ | java.io.Reader | |
| ↳ | java.io.CharArrayReader | |
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | buf | The buffer for characters. | |||||||||
|  | count | The ending index of the buffer. | |||||||||
|  | markedPos | The current mark position. | |||||||||
|  | pos | The current buffer position. | |||||||||
| [Expand] 
           Inherited Fields
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.io.Reader | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Constructs a CharArrayReader on the char array 
            buf. | ||||||||||
|  | 
           Constructs a CharArrayReader on the char array 
            buf. | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           This method closes this CharArrayReader.
           | ||||||||||
|  | 
           Sets a mark position in this reader.
           | ||||||||||
|  | 
           Indicates whether this reader supports the 
            mark()andreset()methods. | ||||||||||
|  | 
           Reads a single character from this reader and returns it as an integer with the two higher-order bytes set to 0.
           | ||||||||||
|  | 
           Reads at most 
            countcharacters from this CharArrayReader and stores them atoffsetin the character arraybuf. | ||||||||||
|  | 
           Indicates whether this reader is ready to be read without blocking.
           | ||||||||||
|  | 
           Resets this reader's position to the last 
            mark()location. | ||||||||||
|  | 
           Skips 
            charCountcharacters in this reader. | ||||||||||
| [Expand] 
           Inherited Methods
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.io.Reader | |||||||||||
|  From class java.lang.Object | |||||||||||
|  From interface java.io.Closeable | |||||||||||
|  From interface java.lang.Readable | |||||||||||
Constructs a CharArrayReader on the char array buf. The size of the reader is set to the length of the buffer and the object to to read from is set to buf.
| buf | the char array from which to read. | 
|---|
Constructs a CharArrayReader on the char array buf. The size of the reader is set to length and the start position from which to read the buffer is set to offset.
| buf | the char array from which to read. | 
|---|---|
| offset | the index of the first character in bufto read. | 
| length | the number of characters that can be read from buf. | 
| IllegalArgumentException | if offset < 0orlength < 0, or ifoffsetis greater than the size ofbuf. | 
|---|
This method closes this CharArrayReader. Once it is closed, you can no longer read from it. Only the first invocation of this method has any effect.
Sets a mark position in this reader. The parameter readLimit is ignored for CharArrayReaders. Calling reset() will reposition the reader back to the marked position provided the mark has not been invalidated.
| readLimit | ignored for CharArrayReaders. | 
|---|
| IOException | if this reader is closed. | 
|---|
Reads a single character from this reader and returns it as an integer with the two higher-order bytes set to 0. Returns -1 if no more characters are available from this reader.
| IOException | if this reader is closed. | 
|---|
Reads at most count characters from this CharArrayReader and stores them at offset in the character array buf. Returns the number of characters actually read or -1 if the end of reader was encountered.
| buffer | the character array to store the characters read. | 
|---|---|
| offset | the initial position in bufferto store the characters read from this reader. | 
| len | the maximum number of characters to read. | 
| IndexOutOfBoundsException | if offset < 0orlen < 0, or ifoffset + lenis bigger than the size ofbuffer. | 
|---|---|
| IOException | if this reader is closed. | 
Indicates whether this reader is ready to be read without blocking. Returns true if the next read will not block. Returns false if this reader may or may not block when read is called. The implementation in CharArrayReader always returns true even when it has been closed.
true if this reader will not block when read is called, false if unknown or blocking will occur.| IOException | if this reader is closed. | 
|---|
Resets this reader's position to the last mark() location. Invocations of read() and skip() will occur from this new location. If this reader has not been marked, it is reset to the beginning of the string.
| IOException | if this reader is closed. | 
|---|
Skips charCount characters in this reader. Subsequent calls to read will not return these characters unless reset is used. This method does nothing and returns 0 if charCount <= 0.
| IOException | if this reader is closed. | 
|---|