de.unkrig.commons.io
Class WyeInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by de.unkrig.commons.io.WyeInputStream
All Implemented Interfaces:
java.io.Closeable

public class WyeInputStream
extends java.io.FilterInputStream

Duplicates all bytes that it reads to an OutputStream.

The OutputStream is flushed on end-of-input and calls to available().


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

Constructor Detail

WyeInputStream

public WyeInputStream(java.io.InputStream in,
                      java.io.OutputStream out)
Method Detail

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.FilterInputStream
Throws:
java.io.IOException