public class TransformingFilterReader extends FilterReader
FilterReader
which transforms the character stream on-the-fly with a Transformer<? super CharSequence, ? super CharSequence>
.
When the delegate reader is at end-of-input, then the transformer is invoked with an empty char sequence, which tells it to "flush itself". This is relevant for stateful transformers.
in
Constructor and Description |
---|
TransformingFilterReader(Reader delegate,
TransformerWhichThrows<? super CharSequence,? extends CharSequence,? extends IOException> transformer) |
Modifier and Type | Method and Description |
---|---|
static Reader |
create(Reader delegate,
TransformerWhichThrows<? super CharSequence,? extends CharSequence,? extends IOException> transformer)
This method is sometimes more efficient than calling "
new TransformingFilterReader() ". |
void |
mark(int readAheadLimit) |
boolean |
markSupported() |
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
boolean |
ready() |
void |
reset() |
long |
skip(long n) |
close
public TransformingFilterReader(Reader delegate, TransformerWhichThrows<? super CharSequence,? extends CharSequence,? extends IOException> transformer)
public static Reader create(Reader delegate, TransformerWhichThrows<? super CharSequence,? extends CharSequence,? extends IOException> transformer)
new TransformingFilterReader()
".public int read() throws IOException
read
in class FilterReader
IOException
public int read(@Nullable char[] cbuf, int off, int len) throws IOException
read
in class FilterReader
IOException
public long skip(long n) throws IOException
skip
in class FilterReader
IOException
public boolean ready()
ready
in class FilterReader
public boolean markSupported()
markSupported
in class FilterReader
public void mark(int readAheadLimit) throws IOException
mark
in class FilterReader
IOException
public void reset() throws IOException
reset
in class FilterReader
IOException
Copyright © 2018 Arno Unkrig. All rights reserved.