public class CharacterFilterReader extends AbstractCharacterFilterReader
int
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 a CharacterSetFilterReader
. You can also nest CharacterFilterReader
s.in
Constructor and Description |
---|
CharacterFilterReader(Reader reader,
int skip)
Constructs a new reader.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
filter(int ch)
Returns true if the given character should be filtered out, false to keep the character.
|
read, read
close, mark, markSupported, ready, reset, skip
public CharacterFilterReader(Reader reader, int skip)
reader
- the reader to filter.skip
- the character to filter out.protected boolean filter(int ch)
AbstractCharacterFilterReader
filter
in class AbstractCharacterFilterReader
ch
- the character to test.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.