| Modifier and Type | Field and Description |
|---|---|
| protected ByteBuffer | buffer
The underlying buffer |
| Access | Constructor and Description |
|---|---|
| public | BufferedWriter(RawIOBase rawIO, int bufferSize)
Construct a BufferedWriter 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 int | read1(ByteBuffer
a ByteBuffer to read bytes into bytes)Overrides org. Reads up to bytes.remaining() bytes. |
| public boolean | readable()
Overrides org. Return whether this file was opened for reading. |
| 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. |
| public long | seek(long
a long position value pos, int an int whence value whence)Overrides org. Seek to byte offset |
| public long | |
| 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 | |
| BufferedWriter | back to summary |
|---|---|
| public BufferedWriter(RawIOBase rawIO, int bufferSize) Construct a BufferedWriter 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.
| |
| flush | back to summary |
|---|---|
| public void flush() Overrides org. Doc from org. Flushes write buffers, if applicable. This is a no-op for read-only and non-blocking streams.
| |
| 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.
| |
| readable | back to summary |
|---|---|
| public boolean readable() Overrides org. Doc from org. Return whether this file was opened for reading.
| |
| 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).
| |
| 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.
| |
| 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().
| |