org.apache.commons.httpclient
Class WireLogInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
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
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WireLogInputStream
public WireLogInputStream(OutputStream log)
- Create an instance that wraps the specified input stream.
- Parameters:
log
- The where to log the read stuff.
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