org.mortbay.util
public class LineInput extends FilterInputStream
Version: $Id: LineInput.java,v 1.17 2005/10/05 11:32:40 gregwilkins Exp $
Nested Class Summary | |
---|---|
static class | LineInput.LineBuffer Reusable LineBuffer.
|
Constructor Summary | |
---|---|
LineInput(InputStream in) Constructor.
| |
LineInput(InputStream in, int bufferSize) Constructor. | |
LineInput(InputStream in, int bufferSize, String encoding) Constructor. |
Method Summary | |
---|---|
int | available() |
void | destroy() |
int | getByteLimit() Get the byte limit. |
InputStream | getInputStream() |
void | mark(int limit) |
boolean | markSupported() |
int | read() |
int | read(byte[] b, int off, int len) |
String | readLine() Read a line ended by CR, LF or CRLF.
|
int | readLine(char[] c, int off, int len) Read a line ended by CR, LF or CRLF.
|
int | readLine(byte[] b, int off, int len) Read a line ended by CR, LF or CRLF. |
LineInput.LineBuffer | readLineBuffer() Read a Line ended by CR, LF or CRLF.
|
LineInput.LineBuffer | readLineBuffer(int len) Read a Line ended by CR, LF or CRLF.
|
void | reset() |
void | setByteLimit(int bytes) Set the byte limit.
|
long | skip(long n) |
Parameters: in The underlying input stream.
Parameters: in The underlying input stream. bufferSize The buffer size and maximum line length.
Parameters: in The underlying input stream. bufferSize The buffer size and maximum line length. encoding the character encoding to use for readLine methods.
Throws: UnsupportedEncodingException
Returns: Number of bytes until EOF is returned or -1 for no limit.
Returns: The line as a String or null for EOF.
Throws: IOException
Parameters: c Character buffer to place the line into. off Offset into the buffer. len Maximum length of line.
Returns: The length of the line or -1 for EOF.
Throws: IOException
Parameters: b Byte array to place the line into. off Offset into the buffer. len Maximum length of line.
Returns: The length of the line or -1 for EOF.
Throws: IOException
Returns: LineBuffer instance or null for EOF.
Throws: IOException
Parameters: len Maximum length of a line, or 0 for default
Returns: LineBuffer instance or null for EOF.
Throws: IOException
Parameters: bytes Limit number of bytes, or -1 for no limit.