java.lang.Object
java.io.InputStream
org.refcodes.io.FilterInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
The
FilterInputStream
wraps an InputStream
adding filtering
functionality of bytes to be skipped.-
Constructor Summary
ConstructorDescriptionFilterInputStream
(InputStream aInputStream, byte... aFilterBytes) Decorates the providedInputStream
filtering functionality.FilterInputStream
(InputStream aInputStream, char... aFilterAsciiChars) Decorates the providedInputStream
filtering functionality. -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, skip, skipNBytes, transferTo
-
Constructor Details
-
FilterInputStream
Decorates the providedInputStream
filtering functionality.- Parameters:
aInputStream
- TheInputStream
to be decorated accordingly.aFilterBytes
- The bytes to be skipped (filtered out).
-
FilterInputStream
public FilterInputStream(InputStream aInputStream, char... aFilterAsciiChars) throws IllegalArgumentException Decorates the providedInputStream
filtering functionality.- Parameters:
aInputStream
- TheInputStream
to be decorated accordingly.aFilterAsciiChars
- The ASCII characters to be skipped (filtered out).- Throws:
IllegalArgumentException
- thrown in case a character is not an ASCII character.
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
mark
in classInputStream
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-