| java.lang.Object java.io.Reader org.apache.derby.iapi.services.io.LimitReader
LimitReader | final public class LimitReader extends Reader implements Limit(Code) | | A Reader that provides methods to limit the range that
can be read from the reader.
|
Constructor Summary | |
public | LimitReader(Reader reader) Construct a LimitReader and call the clearLimit() method. |
Method Summary | |
public int | clearLimit() Clear any limit set by setLimit. | public void | close() | final public int | getLimit() | public int | read() | public int | read(char c, int off, int len) | public void | setLimit(int length) Set the limit of the stream that can be read. | public long | skip(long count) |
LimitReader | public LimitReader(Reader reader)(Code) | | Construct a LimitReader and call the clearLimit() method.
|
clearLimit | public int clearLimit()(Code) | | Clear any limit set by setLimit. After this call no limit checking
will be made on any read until a setLimit()) call is made.
the number of bytes within the limit that have not been read.-1 if not limit was set. |
getLimit | final public int getLimit()(Code) | | return limit of the stream that can be read without throwing
EOFException
the remaining characters left to be read from the stream |
setLimit | public void setLimit(int length)(Code) | | 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
exception: IOException - IOException from some underlying stream exception: EOFException - The set limit would exceedthe available data in the stream. |
|
|