| java.lang.Object org.pnuts.text.AbstractLineReader org.pnuts.text.LineReader
LineReader | public class LineReader extends AbstractLineReader (Code) | | This class is used to read lines from a character stream.
Unlike BufferedReader.readLine(), this class allows you to
process lines without instantiating a String object for each
line.
|
Method Summary | |
protected int | fill(char[] c, int offset, int size) Fills the buffer. | protected void | process(char[] c, int offset, int length) Process a line. | public int | processAll(boolean includeNewLine) Process all lines.
Parameters: includeNewLine - if true newline code (\r|\n|\r\n) is appended. |
needToClose | protected boolean needToClose(Code) | | |
fill | protected int fill(char[] c, int offset, int size) throws IOException(Code) | | Fills the buffer.
This method is called when LineReader needs more data.
|
process | protected void process(char[] c, int offset, int length)(Code) | | Process a line.
Parameters: c - the char buffer that contains the current line. Parameters: offset - the offset of the buffer Parameters: length - the length of the current line |
processAll | public int processAll(boolean includeNewLine) throws IOException(Code) | | Process all lines.
Parameters: includeNewLine - if true newline code (\r|\n|\r\n) is appended. the number of lines processed |
|
|