| Modifier and Type | Field and Description |
|---|---|
| protected ByteBuffer | buffer
The underlying buffer |
| Access | Constructor and Description |
|---|---|
| public | BufferedReader(RawIOBase rawIO, int bufferSize)
Construct a BufferedReader of bufferSize, wrapping the given RawIOBase. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | buffered()
Overrides org. Return true if this objects buffer contains any data. |
| public void | |
| public ByteBuffer | peek(int
the minimal number of bytes as an int size)Overrides org. Returns buffered bytes without advancing the position. |
| public int | read1(ByteBuffer
a ByteBuffer to read bytes into bytes)Overrides org. Reads up to bytes.remaining() bytes. |
| public ByteBuffer | |
| public int | readinto(ByteBuffer
a ByteBuffer to read bytes into bytes)Overrides org. Read up to bytes.remaining() bytes into the given ByteBuffer. |
| protected int | readinto(ByteBuffer
a ByteBuffer to read bytes into bytes, boolean whether to buffer the remaining bytes of the stream, if we can buffered)Overrides org. Read up to bytes.remaining() bytes into the given ByteBuffer, but control whether to attempt to buffer the rest of the underlying stream. |
| public long | seek(long
a long position value pos, int an int whence value whence)Overrides org. Seek to byte offset |
| public long | |
| public boolean | writable()
Overrides org. Return whether this file was opened for writing. |
| public int | write(ByteBuffer
a ByteBuffer value bytes)Overrides org. Write the given ByteBuffer to the IO stream. |
| buffer | back to summary |
|---|---|
| protected ByteBuffer buffer The underlying buffer | |
| BufferedReader | back to summary |
|---|---|
| public BufferedReader(RawIOBase rawIO, int bufferSize) Construct a BufferedReader of bufferSize, wrapping the given RawIOBase. | |
| buffered | back to summary |
|---|---|
| public boolean buffered() Overrides org. Doc from org. Return true if this objects buffer contains any data.
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides org. Doc from org. Clear the read buffer if one exists.
| |
| peek | back to summary |
|---|---|
| public ByteBuffer peek(int size) Overrides org. Doc from org. Returns buffered bytes without advancing the position. The argument indicates a desired minimal number of bytes; we do at most one raw read to satisfy it. We never return more than the size of the underlying buffer;
| |
| read1 | back to summary |
|---|---|
| public int read1(ByteBuffer bytes) Overrides org. Doc from org. Reads up to bytes.remaining() bytes. Returns up to bytes.remaining() bytes. If at least one byte is buffered, we only return buffered bytes. Otherwise, we do one raw read.
| |
| readall | back to summary |
|---|---|
| public ByteBuffer readall() Overrides org. Doc from org. Read until EOF.
| |
| readinto | back to summary |
|---|---|
| public int readinto(ByteBuffer bytes) Overrides org. Doc from org. Read up to bytes.remaining() bytes into the given ByteBuffer. Returns number of bytes read (0 for EOF).
| |
| readinto | back to summary |
|---|---|
| protected int readinto(ByteBuffer bytes, boolean buffered) Overrides org. Doc from org. Read up to bytes.remaining() bytes into the given ByteBuffer, but control whether to attempt to buffer the rest of the underlying stream. Returns the number of bytes read (0 for EOF)
the amount of data read as an int | |
| seek | back to summary | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public long seek(long pos, int whence) Overrides org. Doc from org. Seek to byte offset
a long position value seeked to | |||||||||||||
| tell | back to summary |
|---|---|
| public long tell() Overrides org. Doc from org. Return the current stream position.
| |
| writable | back to summary |
|---|---|
| public boolean writable() Overrides org. Doc from org. Return whether this file was opened for writing.
| |
| write | back to summary |
|---|---|
| public int write(ByteBuffer bytes) Overrides org. Doc from org. Write the given ByteBuffer to the IO stream. Returns the number of bytes written, which may be less than bytes.remaining().
| |