| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: boolean whether or not any data is currently bufferedReturn true if this objects buffer contains any data. |
| public void | |
| public ByteBuffer | Returns: a ByteBuffer containing the bytes readthe minimal number of bytes as an int size)Returns buffered bytes without advancing the position. |
| public ByteBuffer | Returns: a ByteBuffer containing the bytes readthe number of bytes to read size)Read and return up to size bytes, contained in a ByteBuffer. |
| public int | Returns: the amount of data read as an inta ByteBuffer to read bytes into bytes)Reads up to bytes.remaining() bytes. |
| public ByteBuffer | |
| public int | Returns: the amount of data read as an inta ByteBuffer to read bytes into bytes)Read up to bytes.remaining() bytes into the given ByteBuffer. |
| protected int | Returns: the amount of data read as an inta ByteBuffer to read bytes into bytes, boolean whether to buffer the remaining bytes of the stream, if we can buffered)Read up to bytes.remaining() bytes into the given ByteBuffer, but control whether to attempt to buffer the rest of the underlying stream. |
| public int | Returns: the number of bytes written as an inta ByteBuffer value bytes)Write the given ByteBuffer to the IO stream. |
| BufferedIOBase | back to summary |
|---|---|
| public BufferedIOBase() | |
| buffered | back to summary |
|---|---|
| public boolean buffered() Return true if this objects buffer contains any data.
| |
| clear | back to summary |
|---|---|
| public void clear() Clear the read buffer if one exists. | |
| peek | back to summary |
|---|---|
| public ByteBuffer peek(int size) 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;
| |
| read | back to summary |
|---|---|
| public ByteBuffer read(int size) Read and return up to size bytes, contained in a ByteBuffer. ByteBuffers returned from read are already flip()'d. Returns an empty ByteBuffer on EOF
| |
| read1 | back to summary |
|---|---|
| public int read1(ByteBuffer bytes) 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() Read until EOF.
| |
| readinto | back to summary |
|---|---|
| public int readinto(ByteBuffer bytes) 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) 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 | |
| write | back to summary |
|---|---|
| public int write(ByteBuffer bytes) Write the given ByteBuffer to the IO stream. Returns the number of bytes written, which may be less than bytes.remaining().
| |