This interface facilitates intermediate buffering of output data streamed out to a destination channel and provides provides methods for writing lines of text.
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | Returns: The number of bytes written, possibly zero.the destination channel. channel)Makes an attempt to flush the content of this buffer to the given
destination |
| public boolean | Returns: true if there is data in the buffer,
false otherwise.Determines if the buffer contains data. |
| public int | |
| public void | |
| public void | write(ReadableByteChannel
the source channel. src)Reads a sequence of bytes from the source channel into this buffer. |
| public void | writeLine(CharArrayBuffer
the source buffer. src)Copies content of the source buffer into this buffer as one line of text including a line delimiter. |
| capacity | back to summary |
|---|---|
| public int capacity() Returns available space in the buffer.
| |
| flush | back to summary |
|---|---|
| public int flush(WritableByteChannel channel) throws IOException Makes an attempt to flush the content of this buffer to the given
destination
| |
| hasData | back to summary |
|---|---|
| public boolean hasData() Determines if the buffer contains data.
| |
| length | back to summary |
|---|---|
| public int length() Returns the length of this buffer.
| |
| write | back to summary |
|---|---|
| public void write(ByteBuffer src) Copies content of the source buffer into this buffer. The capacity of the destination will be expanded in order to accommodate the entire content of the source buffer.
| |
| write | back to summary |
|---|---|
| public void write(ReadableByteChannel src) throws IOException Reads a sequence of bytes from the source channel into this buffer.
| |
| writeLine | back to summary |
|---|---|
| public void writeLine(CharArrayBuffer src) throws CharacterCodingException Copies content of the source buffer into this buffer as one line of text including a line delimiter. The capacity of the destination will be expanded in order to accommodate the entire content of the source buffer. The choice of a char encoding and line delimiter sequence is up to the specific implementations of this interface.
| |