gnu.inet.util

Class LineInputStream


public class LineInputStream
extends InputStream

An input stream that can read lines of input.

Field Summary

protected InputStream
in
The underlying input stream.

Constructor Summary

LineInputStream(InputStream in)
Constructor using the US-ASCII character encoding.
LineInputStream(InputStream in, String encoding)
Constructor.

Method Summary

int
read()
int
read(byte[] buf)
int
read(byte[] buf, int off, int len)
String
readLine()
Read a line of input.

Field Details

in

protected InputStream in
The underlying input stream.

Constructor Details

LineInputStream

public LineInputStream(InputStream in)
Constructor using the US-ASCII character encoding.
Parameters:
in - the underlying input stream

LineInputStream

public LineInputStream(InputStream in,
                       String encoding)
Constructor.
Parameters:
in - the underlying input stream
encoding - the character encoding to use

Method Details

read

public int read()
            throws IOException

read

public int read(byte[] buf)
            throws IOException

read

public int read(byte[] buf,
                int off,
                int len)
            throws IOException

readLine

public String readLine()
            throws IOException
Read a line of input.