org.apache.http.impl.conn
Class LoggingSessionInputBuffer

java.lang.Object
  extended by org.apache.http.impl.conn.LoggingSessionInputBuffer
All Implemented Interfaces:
org.apache.http.io.SessionInputBuffer

public class LoggingSessionInputBuffer
extends java.lang.Object
implements org.apache.http.io.SessionInputBuffer

Logs all data read to the wire LOG.

Since:
4.0
Author:
Ortwin Glueck, Mike Bowler, Oleg Kalnichevski

Constructor Summary
LoggingSessionInputBuffer(org.apache.http.io.SessionInputBuffer in, Wire wire)
          Create an instance that wraps the specified session input buffer.
 
Method Summary
 org.apache.http.io.HttpTransportMetrics getMetrics()
           
 boolean isDataAvailable(int timeout)
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 java.lang.String readLine()
           
 int readLine(org.apache.http.util.CharArrayBuffer buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingSessionInputBuffer

public LoggingSessionInputBuffer(org.apache.http.io.SessionInputBuffer in,
                                 Wire wire)
Create an instance that wraps the specified session input buffer.

Parameters:
in - The session input buffer.
wire - The wire log to use.
Method Detail

isDataAvailable

public boolean isDataAvailable(int timeout)
                        throws java.io.IOException
Specified by:
isDataAvailable in interface org.apache.http.io.SessionInputBuffer
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Specified by:
read in interface org.apache.http.io.SessionInputBuffer
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Specified by:
read in interface org.apache.http.io.SessionInputBuffer
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Specified by:
read in interface org.apache.http.io.SessionInputBuffer
Throws:
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Specified by:
readLine in interface org.apache.http.io.SessionInputBuffer
Throws:
java.io.IOException

readLine

public int readLine(org.apache.http.util.CharArrayBuffer buffer)
             throws java.io.IOException
Specified by:
readLine in interface org.apache.http.io.SessionInputBuffer
Throws:
java.io.IOException

getMetrics

public org.apache.http.io.HttpTransportMetrics getMetrics()
Specified by:
getMetrics in interface org.apache.http.io.SessionInputBuffer


Copyright © 1999-2008 Apache Software Foundation. All Rights Reserved.