| java.lang.Object org.pnuts.text.AbstractLineReader
All known Subclasses: org.pnuts.text.LineReader, org.pnuts.nio.CharBufferLineReader,
AbstractLineReader | abstract public class AbstractLineReader implements LineProcessor(Code) | | Abstract base class of LineReader.
|
Method Summary | |
abstract protected int | fill(char[] c, int offset, int size) | boolean | fillBuffer() | protected void | process(char[] c, int offset, int length) | public int | processAll() Process all lines. | public int | processAll(boolean includeNewLine) Process all lines.
Parameters: includeNewLine - if true newline code (\r|\n|\r\n) is appended. | public synchronized boolean | processLine(boolean includeNewLine) Reads one line. | public void | stop() If this method is called during the processAll() call, the processing
will be interrupted. |
defaultCharBufferSize | protected static int defaultCharBufferSize(Code) | | |
startChar | protected int startChar(Code) | | |
stopped | protected boolean stopped(Code) | | |
AbstractLineReader | protected AbstractLineReader(int sz)(Code) | | Constructor
Parameters: sz - Input-buffer size exception: IllegalArgumentException - If sz is <= 0 |
AbstractLineReader | protected AbstractLineReader()(Code) | | Constructor
|
fill | abstract protected int fill(char[] c, int offset, int size) throws IOException(Code) | | |
process | protected void process(char[] c, int offset, int length)(Code) | | |
processAll | public int processAll() throws IOException(Code) | | Process all lines.
The line string does not include the newline character at the end of lines.
the number of lines processed |
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 |
processLine | public synchronized boolean processLine(boolean includeNewLine) throws IOException(Code) | | Reads one line.
|
stop | public void stop()(Code) | | If this method is called during the processAll() call, the processing
will be interrupted.
|
|
|