|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.owasp.webscarab.util.LogInputStream
public class LogInputStream
This class can be used to create a copy of the bytes that are read from the supplied InputStream
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
LogInputStream(java.io.InputStream is,
java.io.PrintStream ps)
This class can be used to keep a copy of the bytes read from the supplied InputStream |
Method Summary | |
---|---|
boolean |
markSupported()
Tests if this input stream supports the mark
and reset methods. |
int |
read()
Reads the next byte of data from this input stream. |
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this input stream
into an array of bytes. |
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 |
---|
public LogInputStream(java.io.InputStream is, java.io.PrintStream ps)
is
- The InputStream to read fromps
- the PrintStream to write any bytes read to. We use a PrintStream so that we don't have to worry about any Exceptions on the OutputStreamMethod Detail |
---|
public int read() throws java.io.IOException
int
in the range
0
to 255
. If no byte is available
because the end of the stream has been reached, the value
-1
is returned. This method blocks until input data
is available, the end of the stream is detected, or an exception
is thrown.
This method
simply performs in.read()
and returns the result.
read
in class java.io.FilterInputStream
-1
if the end of the
stream is reached.
java.io.IOException
- if an I/O error occurs.FilterInputStream.in
public int read(byte[] b, int off, int len) throws java.io.IOException
len
bytes of data from this input stream
into an array of bytes. This method blocks until some input is
available.
This method simply performs in.read(b, off, len)
and returns the result.
read
in class java.io.FilterInputStream
b
- the buffer into which the data is read.off
- the start offset of the data.len
- the maximum number of bytes read.
-1
if there is no more data because the end of
the stream has been reached.
java.io.IOException
- if an I/O error occurs.FilterInputStream.in
public boolean markSupported()
mark
and reset
methods.
This method always returns false, as we are not able to reset the
PrintStream in an appropriate manner
markSupported
in class java.io.FilterInputStream
false
FilterInputStream.in
,
InputStream.mark(int)
,
InputStream.reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |