Package com.cedarsoftware.util.io
Class FastPushbackBufferedReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.BufferedReader
-
- com.cedarsoftware.util.io.FastPushbackBufferedReader
-
- All Implemented Interfaces:
FastPushbackReader,Closeable,AutoCloseable,Readable
public class FastPushbackBufferedReader extends BufferedReader implements FastPushbackReader
This class adds significant performance increase over using the JDK PushbackReader. This is due to this class not using synchronization as it is not needed.
-
-
Constructor Summary
Constructors Constructor Description FastPushbackBufferedReader(Reader reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCol()StringgetLastSnippet()intgetLine()intread()voidunread(int c)-
Methods inherited from class java.io.BufferedReader
close, lines, mark, markSupported, read, readLine, ready, reset, skip
-
Methods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
-
-
-
Constructor Detail
-
FastPushbackBufferedReader
public FastPushbackBufferedReader(Reader reader)
-
-
Method Detail
-
getLastSnippet
public String getLastSnippet()
- Specified by:
getLastSnippetin interfaceFastPushbackReader
-
read
public int read() throws IOException- Specified by:
readin interfaceFastPushbackReader- Overrides:
readin classBufferedReader- Throws:
IOException
-
unread
public void unread(int c) throws IOException- Specified by:
unreadin interfaceFastPushbackReader- Throws:
IOException
-
getCol
public int getCol()
- Specified by:
getColin interfaceFastPushbackReader
-
getLine
public int getLine()
- Specified by:
getLinein interfaceFastPushbackReader
-
-