public interface SessionOutputBuffer
ByteBuffer or ReadableByteChannel. This interface also
provides methods for writing lines of text.| Modifier and Type | Method and Description |
|---|---|
int |
flush(WritableByteChannel channel)
Makes an attempt to flush the content of this buffer to the given
destination
WritableByteChannel. |
boolean |
hasData()
Determines if the buffer contains data.
|
int |
length()
Returns the length of this buffer.
|
void |
write(ByteBuffer src)
Copies content of the source buffer into this buffer.
|
void |
write(ReadableByteChannel src)
Reads a sequence of bytes from the source channel into this buffer.
|
void |
writeLine(CharArrayBuffer src)
Copies content of the source buffer into this buffer as one line of text
including a line delimiter.
|
void |
writeLine(String s)
Copies content of the given string into this buffer as one line of text
including a line delimiter.
|
boolean hasData()
true if there is data in the buffer,
false otherwise.int length()
int flush(WritableByteChannel channel) throws IOException
WritableByteChannel.channel - the destination channel.IOException - in case of an I/O error.void write(ByteBuffer src)
src - the source buffer.void write(ReadableByteChannel src) throws IOException
src - the source channel.IOExceptionvoid writeLine(CharArrayBuffer src) throws CharacterCodingException
The choice of a char encoding and line delimiter sequence is up to the specific implementations of this interface.
src - the source buffer.CharacterCodingExceptionvoid writeLine(String s) throws IOException
The choice of a char encoding and line delimiter sequence is up to the specific implementations of this interface.
s - the string.IOExceptionCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.