Top Description Fields Constructors Methods
org.apache.http.impl.conn

public Class LoggingSessionOutputBuffer

extends Object
implements SessionOutputBuffer
Class Inheritance
All Implemented Interfaces
org.apache.http.io.SessionOutputBuffer
Annotations
@Contract
threading:IMMUTABLE
@Deprecated
Imports
java.io.IOException, org.apache.http.Consts, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.io.HttpTransportMetrics, .SessionOutputBuffer, org.apache.http.util.CharArrayBuffer

Deprecated

(4.3) no longer used.

Logs all data written to the wire LOG.
Since
4.0

Field Summary

Modifier and TypeField and Description
private final String
private final SessionOutputBuffer
out

Original data transmitter.

private final Wire
wire

The wire log to use.

Constructor Summary

AccessConstructor and Description
public
LoggingSessionOutputBuffer(final SessionOutputBuffer
The session output buffer.
out
,
final Wire
The Wire log to use.
wire
,
final String
protocol charset, ASCII if null
charset
)

Create an instance that wraps the specified session output buffer.

public

Method Summary

Modifier and TypeMethod and Description
public void
flush()

Implements org.apache.http.io.SessionOutputBuffer.flush.

Flushes this session buffer and forces any buffered output bytes to be written out.
public HttpTransportMetrics
public void
write(final byte[]
the data.
b
,
final int
the start offset in the data.
off
,
final int
the number of bytes to write.
len
)

Implements org.apache.http.io.SessionOutputBuffer.write.

Writes len bytes from the specified byte array starting at offset off to this session buffer.
public void
write(final int
the byte.
b
)

Implements org.apache.http.io.SessionOutputBuffer.write.

Writes the specified byte to this session buffer.
public void
write(final byte[]
the data.
b
)

Implements org.apache.http.io.SessionOutputBuffer.write.

Writes b.length bytes from the specified byte array to this session buffer.
public void
writeLine(final CharArrayBuffer
the buffer containing chars of the line.
buffer
)

Implements org.apache.http.io.SessionOutputBuffer.writeLine.

Writes characters from the specified char array followed by a line delimiter to this session buffer.
public void
writeLine(final String
the line.
s
)

Implements org.apache.http.io.SessionOutputBuffer.writeLine.

Writes characters from the specified string followed by a line delimiter to this session buffer.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

charsetback to summary
private final String charset
outback to summary
private final SessionOutputBuffer out

Original data transmitter.

wireback to summary
private final Wire wire

The wire log to use.

Constructor Detail

LoggingSessionOutputBufferback to summary
public LoggingSessionOutputBuffer(final SessionOutputBuffer out, final Wire wire, final String charset)

Create an instance that wraps the specified session output buffer.

Parameters
out:SessionOutputBuffer

The session output buffer.

wire:Wire

The Wire log to use.

charset:String

protocol charset, ASCII if null

LoggingSessionOutputBufferback to summary
public LoggingSessionOutputBuffer(final SessionOutputBuffer out, final Wire wire)

Method Detail

flushback to summary
public void flush() throws IOException

Implements org.apache.http.io.SessionOutputBuffer.flush.

Doc from org.apache.http.io.SessionOutputBuffer.flush.

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.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
getMetricsback to summary
public HttpTransportMetrics getMetrics()

Implements org.apache.http.io.SessionOutputBuffer.getMetrics.

Doc from org.apache.http.io.SessionOutputBuffer.getMetrics.

Returns HttpTransportMetrics for this session buffer.

Returns:HttpTransportMetrics

transport metrics.

Annotations
@Override
writeback to summary
public void write(final byte[] b, final int off, final int len) throws IOException

Implements org.apache.http.io.SessionOutputBuffer.write.

Doc from org.apache.http.io.SessionOutputBuffer.write.

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.

Parameters
b:byte[]

the data.

off:int

the start offset in the data.

len:int

the number of bytes to write.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writeback to summary
public void write(final int b) throws IOException

Implements org.apache.http.io.SessionOutputBuffer.write.

Doc from org.apache.http.io.SessionOutputBuffer.write.

Writes the specified byte to this session buffer.

Parameters
b:int

the byte.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writeback to summary
public void write(final byte[] b) throws IOException

Implements org.apache.http.io.SessionOutputBuffer.write.

Doc from org.apache.http.io.SessionOutputBuffer.write.

Writes b.length bytes from the specified byte array to this session buffer.

Parameters
b:byte[]

the data.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writeLineback to summary
public void writeLine(final CharArrayBuffer buffer) throws IOException

Implements org.apache.http.io.SessionOutputBuffer.writeLine.

Doc from org.apache.http.io.SessionOutputBuffer.writeLine.

Writes characters from the specified char array followed by a line delimiter to this session buffer.

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

Parameters
buffer:CharArrayBuffer

the buffer containing chars of the line.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writeLineback to summary
public void writeLine(final String s) throws IOException

Implements org.apache.http.io.SessionOutputBuffer.writeLine.

Doc from org.apache.http.io.SessionOutputBuffer.writeLine.

Writes characters from the specified string followed by a line delimiter to this session buffer.

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

Parameters
s:String

the line.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.