gov.nih.nlm.umls.io
Class PushBackReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
gov.nih.nlm.umls.io.PushBackReader
- Direct Known Subclasses:
- SearchStringPushBackReader
- public class PushBackReader
- extends BufferedReader
Extends BufferedReader
to provide the ability to
push a single line of input back onto the reader to read it again
on the next readLine()
call.
- Author:
- Brian Carlsen
Method Summary |
void |
push(String line)
Push a line of input back onto the reader. |
String |
readLine()
Returns the next line from the reader. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
line
protected String line
PushBackReader
public PushBackReader(BufferedReader r)
- Instantiates a new
PushBackReader
wrapped around the
specified reader.
- Parameters:
r
- BufferedReader
readLine
public String readLine()
throws IOException
- Returns the next line from the reader.
- Returns:
- the next line from the reader
- Throws:
IOException
push
public void push(String line)
- Push a line of input back onto the reader.
- Parameters:
line
- input line to be pushed back on reader
Copyright ©2005