@NotThreadSafe public class SessionOutputBufferImpl extends ExpandableBuffer implements SessionOutputBuffer
SessionOutputBuffer based on
the ExpandableBuffer class.
The following parameters can be used to customize the behavior of this class:
buffer, INPUT_MODE, OUTPUT_MODE| Constructor and Description |
|---|
SessionOutputBufferImpl(int buffersize,
int linebuffersize,
ByteBufferAllocator allocator,
HttpParams params) |
SessionOutputBufferImpl(int buffersize,
int linebuffersize,
HttpParams params) |
| 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. |
void |
reset(HttpParams params) |
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 linebuffer)
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.
|
available, capacity, clear, ensureCapacity, expand, getMode, hasData, length, setInputMode, setOutputMode, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasData, lengthpublic SessionOutputBufferImpl(int buffersize,
int linebuffersize,
ByteBufferAllocator allocator,
HttpParams params)
public SessionOutputBufferImpl(int buffersize,
int linebuffersize,
HttpParams params)
public void reset(HttpParams params)
public int flush(WritableByteChannel channel) throws IOException
SessionOutputBufferWritableByteChannel.flush in interface SessionOutputBufferchannel - the destination channel.IOException - in case of an I/O error.public void write(ByteBuffer src)
SessionOutputBufferwrite in interface SessionOutputBuffersrc - the source buffer.public void write(ReadableByteChannel src) throws IOException
SessionOutputBufferwrite in interface SessionOutputBuffersrc - the source channel.IOExceptionpublic void writeLine(CharArrayBuffer linebuffer) throws CharacterCodingException
SessionOutputBufferThe choice of a char encoding and line delimiter sequence is up to the specific implementations of this interface.
writeLine in interface SessionOutputBufferlinebuffer - the source buffer.CharacterCodingExceptionpublic void writeLine(String s) throws IOException
SessionOutputBufferThe choice of a char encoding and line delimiter sequence is up to the specific implementations of this interface.
writeLine in interface SessionOutputBuffers - the string.IOExceptionCopyright © 2005–2013 The Apache Software Foundation. All rights reserved.