@NotThreadSafe public class SessionOutputBufferImpl extends ExpandableBuffer implements SessionOutputBuffer
SessionOutputBuffer based on
the ExpandableBuffer class.buffer, INPUT_MODE, OUTPUT_MODE| 构造器和说明 |
|---|
SessionOutputBufferImpl(int buffersize) |
SessionOutputBufferImpl(int buffersize,
int linebuffersize) |
SessionOutputBufferImpl(int buffersize,
int lineBuffersize,
ByteBufferAllocator allocator,
HttpParams params)
|
SessionOutputBufferImpl(int buffersize,
int linebuffersize,
java.nio.charset.Charset charset) |
SessionOutputBufferImpl(int buffersize,
int lineBuffersize,
java.nio.charset.CharsetEncoder charencoder,
ByteBufferAllocator allocator)
Creates SessionOutputBufferImpl instance.
|
SessionOutputBufferImpl(int buffersize,
int linebuffersize,
HttpParams params)
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
flush(java.nio.channels.WritableByteChannel channel)
Makes an attempt to flush the content of this buffer to the given
destination
WritableByteChannel. |
void |
reset(HttpParams params) |
void |
write(java.nio.ByteBuffer src)
Copies content of the source buffer into this buffer.
|
void |
write(java.nio.channels.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(java.lang.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,
java.nio.charset.CharsetEncoder charencoder,
ByteBufferAllocator allocator)
buffersize - input buffer sizelineBuffersize - buffer size for line operations. Has effect only if
charencoder is not null.charencoder - charencoder to be used for encoding HTTP protocol elements.
If null simple category cast will be used for char to byte conversion.allocator - memory allocator.
If null HeapByteBufferAllocator.INSTANCE will be used.@Deprecated
public SessionOutputBufferImpl(int buffersize,
int lineBuffersize,
ByteBufferAllocator allocator,
HttpParams params)
@Deprecated
public SessionOutputBufferImpl(int buffersize,
int linebuffersize,
HttpParams params)
SessionOutputBufferImpl(int, int, Charset)public SessionOutputBufferImpl(int buffersize)
public SessionOutputBufferImpl(int buffersize,
int linebuffersize,
java.nio.charset.Charset charset)
public SessionOutputBufferImpl(int buffersize,
int linebuffersize)
public void reset(HttpParams params)
public int flush(java.nio.channels.WritableByteChannel channel)
throws java.io.IOException
SessionOutputBufferWritableByteChannel.flush 在接口中 SessionOutputBufferchannel - the destination channel.java.io.IOException - in case of an I/O error.public void write(java.nio.ByteBuffer src)
SessionOutputBufferwrite 在接口中 SessionOutputBuffersrc - the source buffer.public void write(java.nio.channels.ReadableByteChannel src)
throws java.io.IOException
SessionOutputBufferwrite 在接口中 SessionOutputBuffersrc - the source channel.java.io.IOExceptionpublic void writeLine(CharArrayBuffer linebuffer) throws java.nio.charset.CharacterCodingException
SessionOutputBufferThe choice of a char encoding and line delimiter sequence is up to the specific implementations of this interface.
writeLine 在接口中 SessionOutputBufferlinebuffer - the source buffer.java.nio.charset.CharacterCodingExceptionpublic void writeLine(java.lang.String s)
throws java.io.IOException
SessionOutputBufferThe choice of a char encoding and line delimiter sequence is up to the specific implementations of this interface.
writeLine 在接口中 SessionOutputBuffers - the string.java.io.IOException