gnu.inet.util
Class LineInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by gnu.inet.util.LineInputStream
All Implemented Interfaces:
java.io.Closeable

public class LineInputStream
extends java.io.FilterInputStream

An input stream that can read lines of input.

Author:
Chris Burdess

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
LineInputStream(java.io.InputStream in)
          Constructor using the US-ASCII character encoding.
LineInputStream(java.io.InputStream in, java.lang.String encoding)
          Constructor.
 
Method Summary
 java.lang.String readLine()
          Read a line of input.
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineInputStream

public LineInputStream(java.io.InputStream in)
Constructor using the US-ASCII character encoding.

Parameters:
in - the underlying input stream

LineInputStream

public LineInputStream(java.io.InputStream in,
                       java.lang.String encoding)
Constructor.

Parameters:
in - the underlying input stream
encoding - the character encoding to use
Method Detail

readLine

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

Throws:
java.io.IOException


© Copyright 2003 The Free Software Foundation, all rights reserved