public class LineNumberInputStream extends java.io.FilterInputStream implements LineNumberSource
InputStream used by the parser to wrap the original user
supplied stream. This stream keeps track of the current line number.| Constructor and Description |
|---|
LineNumberInputStream(java.io.InputStream is)
Creates a new
LineNumberInputStream. |
| Modifier and Type | Method and Description |
|---|---|
int |
getLineNumber()
Gets the current line number starting at 1 (the number of
\r\n read so far plus 1). |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
public LineNumberInputStream(java.io.InputStream is)
LineNumberInputStream.is - the stream to read from.public int getLineNumber()
LineNumberSource\r\n read so far plus 1).getLineNumber in interface LineNumberSourcepublic int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOException