|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReaderBuffer
Implements a sort of a sliding window on a reader.
In contrast to a standard Reader
it counts the characters
read and allows reading from a specified position.
Because a typical implementation will use a buffer of a delimited size
it is not guaranteed that data from an arbitrary position can be retrieved.
Method Summary | |
---|---|
void |
free(int pos)
Frees the buffer before the specified position. |
int |
read(char[] cbuf,
int off,
int len,
int pos)
Retrieves a sequence of characters as described in . |
Methods inherited from interface java.io.Closeable |
---|
close |
Method Detail |
---|
int read(char[] cbuf, int off, int len, int pos) throws IOException
read
.
cbuf
- Destination bufferoff
- Offset at which to start storing characterslen
- Maximum number of characters to readpos
- Position, where to start reading in the stream
IOException
- If the specified position is not covered by
the underlying buffer or
if an I/O error occursvoid free(int pos)
pos
- All characters before this position may no longer be stored
in the underlying buffer.
Actual behaviour depends on the implementation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |