jimmc.roots
Class LineInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--java.io.DataInputStream
                    |
                    +--jimmc.roots.LineInputStream
All Implemented Interfaces:
java.io.DataInput

public class LineInputStream
extends java.io.DataInputStream

LineInputStream is a generic line-mode input stream.


Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
LineInputStream(java.io.InputStream in)
          Create a new LineInputStream from the specified stream.
 
Method Summary
 int getLineNumber()
          Get the line number of the line to be returned on the next call to readCountedLine.
 java.lang.String readCountedLine()
          Read one line of text.
 
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, 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)
Create a new LineInputStream from the specified stream.
Method Detail

getLineNumber

public int getLineNumber()
Get the line number of the line to be returned on the next call to readCountedLine.
Returns:
the line number in the file; the first line is line 1

readCountedLine

public java.lang.String readCountedLine()
Read one line of text.
Returns:
the line of text without the newline; null on EOF