org.apache.geronimo.javamail.util
Class TraceInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.geronimo.javamail.util.TraceInputStream
- All Implemented Interfaces:
- Closeable
public class TraceInputStream
- extends FilterInputStream
- Version:
- $Rev: 668614 $ $Date: 2008-06-17 07:04:26 -0400 (Tue, 17 Jun 2008) $
Method Summary |
int |
read()
Read the next byte of data from the input stream, returning it as an
int value. |
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this input stream, placing them directly
into the provided byte array. |
void |
setDebug(boolean d)
Set the current setting of the debug trace stream debug flag. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debug
protected boolean debug
traceStream
protected OutputStream traceStream
TraceInputStream
public TraceInputStream(InputStream in,
OutputStream traceStream,
boolean debug,
boolean encode)
- Construct a debug trace stream.
- Parameters:
in
- The source input stream.traceStream
- The side trace stream to which trace data gets written.encode
- Indicates whether we wish the Trace data to be Q-P encoded.
setDebug
public void setDebug(boolean d)
- Set the current setting of the debug trace stream debug flag.
- Parameters:
d
- The new debug flag settings.
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Reads up to len bytes of data from this input stream, placing them directly
into the provided byte array.
- Overrides:
read
in class FilterInputStream
- Parameters:
b
- the provided data buffer.off
- the starting offset within the buffer for placing the data.len
- the maximum number of bytes to read.
- Returns:
- that number of bytes that have been read and copied into the
buffer or -1 if an end of stream occurs.
- Throws:
IOException
- for any I/O errors.
read
public int read()
throws IOException
- Read the next byte of data from the input stream, returning it as an
int value. Returns -1 if the end of stream is detected.
- Overrides:
read
in class FilterInputStream
- Returns:
- The next byte of data or -1 to indicate end-of-stream.
- Throws:
IOException
- for any I/O errors
Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.