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 int
getCol()
String
getLastSnippet()
int
getLine()
int
read()
void
unread(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:
getLastSnippet
in interfaceFastPushbackReader
-
read
public int read() throws IOException
- Specified by:
read
in interfaceFastPushbackReader
- Overrides:
read
in classBufferedReader
- Throws:
IOException
-
unread
public void unread(int c) throws IOException
- Specified by:
unread
in interfaceFastPushbackReader
- Throws:
IOException
-
getCol
public int getCol()
- Specified by:
getCol
in interfaceFastPushbackReader
-
getLine
public int getLine()
- Specified by:
getLine
in interfaceFastPushbackReader
-
-