| java.lang.Object org.pnuts.nio.AbstractLineInputStream
All known Subclasses: org.pnuts.nio.ByteBufferLineInputStream, org.pnuts.nio.LineInputStream,
AbstractLineInputStream | abstract public class AbstractLineInputStream implements LineProcessor(Code) | | Abstract base class of LineInputStream.
|
Method Summary | |
abstract protected int | fill(byte[] c, int offset, int size) | boolean | fillBuffer() | protected void | process(byte[] 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. |
defaultBufferSize | protected static int defaultBufferSize(Code) | | |
startChar | protected int startChar(Code) | | |
stopped | protected boolean stopped(Code) | | |
AbstractLineInputStream | protected AbstractLineInputStream(int sz)(Code) | | Constructor
Parameters: sz - Input-buffer size exception: IllegalArgumentException - If sz is <= 0 |
AbstractLineInputStream | protected AbstractLineInputStream()(Code) | | Constructor
|
fill | abstract protected int fill(byte[] c, int offset, int size) throws IOException(Code) | | |
process | protected void process(byte[] 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.
|
|
|