org.apache.commons.httpclient
Class WireLogInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by org.apache.commons.httpclient.WireLogInputStream
All Implemented Interfaces:
Closeable

public class WireLogInputStream
extends FilterInputStream

Logs all data read to the wire LOG.

Since:
2.0
Author:
Ortwin Gl�ck, Jens Elkner, Mike Bowler, Oleg Kalnichevski

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
WireLogInputStream(OutputStream log)
          Create an instance that wraps the specified input stream.
 
Method Summary
 void log(String s)
          Log the given string to the logfile
 boolean markSupported()
          This class does not support marks.
 int read()
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WireLogInputStream

public WireLogInputStream(OutputStream log)
Create an instance that wraps the specified input stream.

Parameters:
log - The where to log the read stuff.
Method Detail

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException
See Also:
InputStream.read(byte[], int, int)

read

public int read()
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException
See Also:
InputStream.read()

markSupported

public boolean markSupported()
This class does not support marks.

Overrides:
markSupported in class FilterInputStream
Returns:
always false.

log

public void log(String s)
         throws IOException
Log the given string to the logfile

Parameters:
s - string to log
Throws:
IOException


Copyright (c) 1999-2005 - Apache Software Foundation