org.apache.james.util
Class DebugInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.apache.james.util.DebugInputStream

public class DebugInputStream
extends InputStream

Reads data off a stream, printing every byte read to System.err.


Constructor Summary
DebugInputStream(InputStream in)
          Constructor that takes an InputStream to be wrapped.
 
Method Summary
 void close()
          Close the stream
 int read()
          Read a byte off the stream
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugInputStream

public DebugInputStream(InputStream in)
Constructor that takes an InputStream to be wrapped.

Parameters:
in - the InputStream to be wrapped
Method Detail

read

public int read()
         throws IOException
Read a byte off the stream

Returns:
the byte read off the stream
Throws:
IOException - if an exception is encountered when reading

close

public void close()
           throws IOException
Close the stream

Throws:
IOException - if an exception is encountered when closing


"Copyright © 1999-2006 Apache Jakarta Project. All Rights Reserved."