lapisx.io
Class TeeStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended bylapisx.io.TeeStream

public class TeeStream
extends FilterInputStream

TeeStream is used to simultaneously write to an OutputStream (passed as an argument to the constructor) as bytes are read from the underlying InputStream.


Field Summary
protected  OutputStream out
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
TeeStream(InputStream in, OutputStream out)
           
 
Method Summary
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected OutputStream out
Constructor Detail

TeeStream

public TeeStream(InputStream in,
                 OutputStream out)
Method Detail

read

public int read()
         throws IOException
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Throws:
IOException