public abstract class AbstractCharacterFilterReader
extends java.io.FilterReader
Modifier and Type | Field and Description |
---|---|
private java.util.function.IntPredicate |
skip |
protected static java.util.function.IntPredicate |
SKIP_NONE
Skips nothing.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractCharacterFilterReader(java.io.Reader reader)
Constructs a new reader.
|
protected |
AbstractCharacterFilterReader(java.io.Reader reader,
java.util.function.IntPredicate 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.
|
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
protected static final java.util.function.IntPredicate SKIP_NONE
private final java.util.function.IntPredicate skip
protected AbstractCharacterFilterReader(java.io.Reader reader)
reader
- the reader to filterprotected AbstractCharacterFilterReader(java.io.Reader reader, java.util.function.IntPredicate skip)
reader
- the reader to filter.skip
- Skip test.protected boolean filter(int ch)
ch
- the character to test.public int read() throws java.io.IOException
read
in class java.io.FilterReader
java.io.IOException
public int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.FilterReader
java.io.IOException