Class LoggingSessionOutputBuffer

java.lang.Object
org.apache.http.impl.conn.LoggingSessionOutputBuffer
All Implemented Interfaces:
SessionOutputBuffer

@Contract(threading=IMMUTABLE) @Deprecated public class LoggingSessionOutputBuffer extends Object implements SessionOutputBuffer
Deprecated.
(4.3) no longer used.
Logs all data written to the wire LOG.
Since:
4.0
  • Constructor Details

    • LoggingSessionOutputBuffer

      public LoggingSessionOutputBuffer(SessionOutputBuffer out, Wire wire, String charset)
      Deprecated.
      Create an instance that wraps the specified session output buffer.
      Parameters:
      out - The session output buffer.
      wire - The Wire log to use.
      charset - protocol charset, ASCII if null
    • LoggingSessionOutputBuffer

      public LoggingSessionOutputBuffer(SessionOutputBuffer out, Wire wire)
      Deprecated.
  • Method Details

    • write

      public void write(byte[] b, int off, int len) throws IOException
      Deprecated.
      Description copied from interface: SessionOutputBuffer
      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.

      Specified by:
      write in interface SessionOutputBuffer
      Parameters:
      b - the data.
      off - the start offset in the data.
      len - the number of bytes to write.
      Throws:
      IOException - if an I/O error occurs.
    • write

      public void write(int b) throws IOException
      Deprecated.
      Description copied from interface: SessionOutputBuffer
      Writes the specified byte to this session buffer.
      Specified by:
      write in interface SessionOutputBuffer
      Parameters:
      b - the byte.
      Throws:
      IOException - if an I/O error occurs.
    • write

      public void write(byte[] b) throws IOException
      Deprecated.
      Description copied from interface: SessionOutputBuffer
      Writes b.length bytes from the specified byte array to this session buffer.
      Specified by:
      write in interface SessionOutputBuffer
      Parameters:
      b - the data.
      Throws:
      IOException - if an I/O error occurs.
    • flush

      public void flush() throws IOException
      Deprecated.
      Description copied from interface: SessionOutputBuffer
      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.
      Specified by:
      flush in interface SessionOutputBuffer
      Throws:
      IOException - if an I/O error occurs.
    • writeLine

      public void writeLine(CharArrayBuffer buffer) throws IOException
      Deprecated.
      Description copied from interface: SessionOutputBuffer
      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.

      Specified by:
      writeLine in interface SessionOutputBuffer
      Parameters:
      buffer - the buffer containing chars of the line.
      Throws:
      IOException - if an I/O error occurs.
    • writeLine

      public void writeLine(String s) throws IOException
      Deprecated.
      Description copied from interface: SessionOutputBuffer
      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.

      Specified by:
      writeLine in interface SessionOutputBuffer
      Parameters:
      s - the line.
      Throws:
      IOException - if an I/O error occurs.
    • getMetrics

      public HttpTransportMetrics getMetrics()
      Deprecated.
      Description copied from interface: SessionOutputBuffer
      Returns HttpTransportMetrics for this session buffer.
      Specified by:
      getMetrics in interface SessionOutputBuffer
      Returns:
      transport metrics.