java.lang.Object | |
↳ | org.apache.http.impl.io.AbstractSessionOutputBuffer |
Known Direct Subclasses |
Abstract base class for session output buffers that stream data to an arbitrary OutputStream. This class buffers small chunks of output data in an internal byte array for optimal output performance.
writeLine(CharArrayBuffer)
and writeLine(String)
methods
of this class use CR-LF as a line delimiter.
The following parameters can be used to customize the behavior of this class:
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns available space in the buffer.
| |||||||||||
Returns total capacity of the buffer
| |||||||||||
Flushes this session buffer and forces any buffered output bytes
to be written out.
| |||||||||||
Returns
HttpTransportMetrics for this session buffer. | |||||||||||
Return length data stored in the buffer
| |||||||||||
Writes the specified byte to this session buffer.
| |||||||||||
Writes
len bytes from the specified byte array
starting at offset off to this session buffer. | |||||||||||
Writes
b.length bytes from the specified byte array
to this session buffer. | |||||||||||
Writes characters from the specified char array followed by a line
delimiter to this session buffer.
| |||||||||||
Writes characters from the specified string followed by a line delimiter
to this session buffer.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Initializes this session output buffer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.apache.http.io.BufferInfo
| |||||||||||
From interface
org.apache.http.io.SessionOutputBuffer
|
Returns available space in the buffer.
Returns total capacity of the buffer
Flushes this session buffer and forces any buffered output bytes
to be written out. The general contract of flush
is
that calling it is an indication that, if any bytes previously
written have been buffered by the implementation of the output
stream, such bytes should immediately be written to their
intended destination.
IOException |
---|
Returns HttpTransportMetrics
for this session buffer.
Return length data stored in the buffer
Writes len
bytes from the specified byte array
starting at offset off
to this session buffer.
If off
is negative, or len
is negative, or
off+len
is greater than the length of the array
b
, then an IndexOutOfBoundsException is thrown.
b | the data. |
---|---|
off | the start offset in the data. |
len | the number of bytes to write. |
IOException |
---|
Writes b.length
bytes from the specified byte array
to this session buffer.
b | the data. |
---|
IOException |
---|
Writes characters from the specified char array followed by a line delimiter to this session buffer.
This method uses CR-LF as a line delimiter.
s | the buffer containing chars of the line. |
---|
IOException | if an I/O error occurs. |
---|
Writes characters from the specified string followed by a line delimiter to this session buffer.
This method uses CR-LF as a line delimiter.
s | the line. |
---|
IOException | if an I/O error occurs. |
---|
Initializes this session output buffer.
outstream | the destination output stream. |
---|---|
buffersize | the size of the internal buffer. |
params | HTTP parameters. |