Package net.hydromatic.morel
Class Main.BufferingReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.FilterReader
-
- net.hydromatic.morel.Main.BufferingReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
- Enclosing class:
- Main
static class Main.BufferingReader extends FilterReader
Reader that snoops which characters have been read and saves them in a buffer untilflush()is called.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) StringBuilderbuf-
Fields inherited from class java.io.FilterReader
in
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBufferingReader(Reader in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringflush()intread()intread(char[] cbuf, int off, int len)-
Methods inherited from class java.io.FilterReader
close, mark, markSupported, ready, reset, skip
-
Methods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
-
-
-
Field Detail
-
buf
final StringBuilder buf
-
-
Constructor Detail
-
BufferingReader
protected BufferingReader(Reader in)
-
-
Method Detail
-
read
public int read() throws IOException- Overrides:
readin classFilterReader- Throws:
IOException
-
read
public int read(char[] cbuf, int off, int len) throws IOException- Overrides:
readin classFilterReader- Throws:
IOException
-
flush
public String flush()
-
-