public class

SessionOutputBufferImpl

extends ExpandableBuffer
implements SessionOutputBuffer
java.lang.Object
   ↳ org.apache.http.nio.util.ExpandableBuffer
     ↳ org.apache.http.impl.nio.reactor.SessionOutputBufferImpl

Class Overview

Default implementation of SessionOutputBuffer based on the ExpandableBuffer class.

The following parameters can be used to customize the behavior of this class:

Summary

[Expand]
Inherited Constants
From class org.apache.http.nio.util.ExpandableBuffer
[Expand]
Inherited Fields
From class org.apache.http.nio.util.ExpandableBuffer
Public Constructors
SessionOutputBufferImpl(int buffersize, int linebuffersize, ByteBufferAllocator allocator, HttpParams params)
SessionOutputBufferImpl(int buffersize, int linebuffersize, HttpParams params)
Public Methods
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.
[Expand]
Inherited Methods
From class org.apache.http.nio.util.ExpandableBuffer
From class java.lang.Object
From interface org.apache.http.io.BufferInfo
From interface org.apache.http.nio.reactor.SessionOutputBuffer
From interface org.apache.http.nio.util.BufferInfo

Public Constructors

public SessionOutputBufferImpl (int buffersize, int linebuffersize, ByteBufferAllocator allocator, HttpParams params)

public SessionOutputBufferImpl (int buffersize, int linebuffersize, HttpParams params)

Public Methods

public int flush (WritableByteChannel channel)

Makes an attempt to flush the content of this buffer to the given destination WritableByteChannel.

Parameters
channel the destination channel.
Returns
  • The number of bytes written, possibly zero.
Throws
IOException

public void reset (HttpParams params)

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.

Parameters
src the source buffer.

public void write (ReadableByteChannel src)

Reads a sequence of bytes from the source channel into this buffer.

Parameters
src the source channel.
Throws
IOException

public void writeLine (CharArrayBuffer linebuffer)

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.

Parameters
linebuffer the source buffer.
Throws
CharacterCodingException

public void writeLine (String s)

Copies content of the given string 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 string.

The choice of a char encoding and line delimiter sequence is up to the specific implementations of this interface.

Parameters
s the string.
Throws
IOException