FileDocCategorySizeDatePackage
DebugInputStream.javaAPI DocApache James 2.3.12182Fri Jan 12 12:56:32 GMT 2007org.apache.james.util

DebugInputStream

public class DebugInputStream extends InputStream
Reads data off a stream, printing every byte read to System.err.

Fields Summary
InputStream
in
The input stream being wrapped
Constructors Summary
public DebugInputStream(InputStream in)
Constructor that takes an InputStream to be wrapped.

param
in the InputStream to be wrapped


                        
       
        this.in = in;
    
Methods Summary
public voidclose()
Close the stream

throws
IOException if an exception is encountered when closing

        in.close();
    
public intread()
Read a byte off the stream

return
the byte read off the stream
throws
IOException if an exception is encountered when reading

        int b = in.read();
        System.err.write(b);
        return b;