Package com.compomics.util.io
Class PushBackStringReader
java.lang.Object
com.compomics.util.io.PushBackStringReader
public class PushBackStringReader extends Object
This class implements a PushBackReader for Strings which allows the reading
of entire lines as well as the pushing back of entire lines.
Little more functionality is present at this time.
Little more functionality is present at this time.
- Author:
- Lennart Martens
-
Constructor Summary
Constructors Constructor Description PushBackStringReader()
Empty default constructorPushBackStringReader(String aSource)
This constructor requires the passing of a String from which to construct the PushBackStringReader. -
Method Summary
Modifier and Type Method Description String
readLine()
This method reads a line of text from the buffer.void
unreadLine()
This method 'unreads' a line of text from the Buffer.
-
Constructor Details
-
PushBackStringReader
public PushBackStringReader()Empty default constructor -
PushBackStringReader
This constructor requires the passing of a String from which to construct the PushBackStringReader.- Parameters:
aSource
- String to construct the PushBackStringReader from.
-
-
Method Details
-
readLine
This method reads a line of text from the buffer. It returns a 'null' if the EOF is encountered.- Returns:
- String with the current line in the buffer, or 'null' if the end of the buffer has been reached.
-
unreadLine
public void unreadLine()This method 'unreads' a line of text from the Buffer.
-