public class LineInputStream
extends java.io.FilterInputStream
LineOutputStream
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buffer |
Constructor and Description |
---|
LineInputStream(java.io.InputStream in)
Creates a new LineInputStream to read data from the specified
input stream.
|
LineInputStream(java.io.InputStream in,
int bufferSize)
Creates a new LineInputStream to read data from the specified
input stream.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBuffer()
Returns the data in the buffer.
|
byte[] |
getLineDelimiter()
Returns the line delimiter of the line just read.
|
java.lang.String |
readLine()
Reads a line of text.
|
public LineInputStream(java.io.InputStream in)
in
- the underlying input streampublic LineInputStream(java.io.InputStream in, int bufferSize)
in
- the underlying input streambufferSize
- the (initial) size of the internal bufferjava.lang.IllegalArgumentException
- if bufferSize <= 0public java.lang.String readLine() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic byte[] getLineDelimiter()
public byte[] getBuffer() throws java.io.IOException
java.io.IOException