Package org.apache.commons.io.input
Class CharacterFilterReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.FilterReader
-
- org.apache.commons.io.input.AbstractCharacterFilterReader
-
- org.apache.commons.io.input.CharacterFilterReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Readable
public class CharacterFilterReader extends AbstractCharacterFilterReader
A filter reader that filters out a given character represented as anint
code point, handy to remove known junk characters from CSV files for example. This class is the most efficient way to filter out a single character, as opposed to using aCharacterSetFilterReader
. You can also nestCharacterFilterReader
s.
-
-
Constructor Summary
Constructors Constructor Description CharacterFilterReader(java.io.Reader reader, int skip)
Constructs a new reader.CharacterFilterReader(java.io.Reader reader, java.util.function.IntPredicate skip)
Constructs a new reader.
-
Method Summary
-
Methods inherited from class org.apache.commons.io.input.AbstractCharacterFilterReader
read, read
-
-
-
-
Constructor Detail
-
CharacterFilterReader
public CharacterFilterReader(java.io.Reader reader, int skip)
Constructs a new reader.- Parameters:
reader
- the reader to filter.skip
- the character to filter out.
-
CharacterFilterReader
public CharacterFilterReader(java.io.Reader reader, java.util.function.IntPredicate skip)
Constructs a new reader.- Parameters:
reader
- the reader to filter.skip
- Skip test.- Since:
- 2.9.0
-
-