de.unkrig.commons.io
Class ByteFilterInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
de.unkrig.commons.io.ByteFilterInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class ByteFilterInputStream
- extends java.io.FilterInputStream
A FilterInputStream that transforms the byte stream through a ByteFilter. Any IOException
and RuntimeException that ByteFilter.run(java.io.InputStream, java.io.OutputStream) throws is caught and rethrown by the read()
methods of this object.
| Fields inherited from class java.io.FilterInputStream |
in |
|
Method Summary |
void |
close()
|
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
| Methods inherited from class java.io.FilterInputStream |
available, mark, markSupported, read, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteFilterInputStream
public ByteFilterInputStream(java.io.InputStream in,
ByteFilter<?> byteFilter)
- See Also:
ByteFilterInputStream
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
close
public void close()
throws java.io.IOException
- Specified by:
close in interface java.io.Closeable- Overrides:
close in class java.io.FilterInputStream
- Throws:
java.io.IOException