de.unkrig.commons.io
Interface ByteFilter<T>

Type Parameters:
T - The type of the object returned by run(InputStream, OutputStream)

public interface ByteFilter<T>

An object that reads bytes from an InputStream and writes bytes to an OutputStream.


Method Summary
 T run(java.io.InputStream in, java.io.OutputStream out)
          Reads bytes from the given InputStream (up to end-of-input or not), and writes bytes to the given OutputStream.
 

Method Detail

run

@Nullable
T run(java.io.InputStream in,
               java.io.OutputStream out)
      throws java.io.IOException
Reads bytes from the given InputStream (up to end-of-input or not), and writes bytes to the given OutputStream. This is similar to the "pipeline" pattern known from UNIX shells.

Throws:
java.io.IOException