public class TraceInputStream extends FilterInputStream
in
Constructor and Description |
---|
TraceInputStream(InputStream in,
OutputStream traceOut)
Creates an input stream filter built on top of the specified
input stream.
|
Modifier and Type | Method and Description |
---|---|
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. |
void |
setQuote(boolean quote)
Set quote mode.
|
void |
setTrace(boolean trace)
Set trace mode.
|
available, close, mark, markSupported, read, reset, skip
public TraceInputStream(InputStream in, OutputStream traceOut)
in
- the underlying input stream.traceOut
- the trace streampublic void setTrace(boolean trace)
trace
- the trace modepublic void setQuote(boolean quote)
quote
- the quote modepublic int read() throws IOException
-1
if no data is available. Writes out the read
byte into the trace stream, if trace mode is true
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
len
bytes of data from this input stream
into an array of bytes. Returns -1
if no more data
is available. Writes out the read bytes into the trace stream, if
trace mode is true
read
in class FilterInputStream
IOException
Copyright © 2018 JBoss by Red Hat. All rights reserved.