|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
org.openuat.util.DebugInputStream
public class DebugInputStream
This is a decorator for an InputStream that will log every character read from the underlying stream at log4j trace level.
| Constructor Summary | |
|---|---|
DebugInputStream(java.io.InputStream realStream,
java.lang.String loggingName)
Initializes the decorator with the real stream. |
|
| Method Summary | |
|---|---|
int |
available()
Only passes through to realStream, no logging. |
void |
close()
Only passes through to realStream, no logging. |
void |
mark(int arg0)
Only passes through to realStream, no logging. |
boolean |
markSupported()
Only passes through to realStream, no logging. |
int |
read()
Passes through to realStream, but logs. |
int |
read(byte[] arr)
Passes through to realStream, but logs. |
int |
read(byte[] arr,
int off,
int len)
Passes through to realStream, but logs. |
void |
reset()
Only passes through to realStream, no logging. |
long |
skip(long arg0)
Only passes through to realStream, no logging. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DebugInputStream(java.io.InputStream realStream,
java.lang.String loggingName)
realStream - The InputStream to read from.loggingName - The class name to use for logging purposes. This
should be the full class name (including package) of
the calling class.| Method Detail |
|---|
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] arr)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] arr,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public long skip(long arg0)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOException
public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOExceptionpublic void mark(int arg0)
mark in class java.io.InputStream
public void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStream
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||