| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private Reader | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the number of bytes within the limit that have not been read. -1 if not limit was set.Implements org. Clear any limit set by setLimit. |
| public void | close()
Implements abstract java. Implements java. Closes the stream and releases any system resources associated with it. |
| public final int | Returns: the remaining characters left to be read from the streamreturn limit of the stream that can be read without throwing EOFException |
| public int | |
| public int | read(char[]
Destination buffer c, int Offset at which to start storing characters off, int Maximum number of characters to read len)Implements abstract java. Reads characters into a portion of an array. |
| public void | setLimit(int
The length to set length)Implements org. Set the limit of the stream that can be read. |
| public long |
| limitInPlace | back to summary |
|---|---|
| private boolean limitInPlace | |
| reader | back to summary |
|---|---|
| private Reader reader | |
| remainingCharacters | back to summary |
|---|---|
| private int remainingCharacters | |
| LimitReader | back to summary |
|---|---|
| public LimitReader(Reader reader) Construct a LimitReader and call the clearLimit() method.
| |
| clearLimit | back to summary |
|---|---|
| public int clearLimit() Implements org. Clear any limit set by setLimit. After this call no limit checking will be made on any read until a setLimit()) call is made.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), reset(), or skip() invocations will throw an IOException. Closing a previously closed stream has no effect.
| |
| getLimit | back to summary |
|---|---|
| public final int getLimit() return limit of the stream that can be read without throwing EOFException
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Doc from java. Reads a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached. Subclasses that intend to support efficient single-character input should override this method.
| |
| read | back to summary |
|---|---|
| public int read(char[] c, int off, int len) throws IOException Implements abstract java. Doc from java. Reads characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached. If
| |
| setLimit | back to summary |
|---|---|
| public void setLimit(int length) Implements org. Set the limit of the stream that can be read. After this call up to and including length characters can be read from or skipped in the stream. Any attempt to read more than length characters will result in an EOFException
| |
| skip | back to summary |
|---|---|
| public long skip(long count) throws IOException Overrides java. Doc from java. Skips characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached. If the stream is already at its end before this method is invoked, then no characters are skipped and zero is returned.
| |