|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
info.aduna.io.CharPosInputStream
public class CharPosInputStream
An InputStream that registers the position of the next character to read. This position can be a character offset or a combination of a line and column number. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r') , or a carriage return followed immediately by a linefeed ('\r\n').
Note: this class is only guaranteed to work correctly when the stream contains US-ASCII characters.
| Constructor Summary | |
|---|---|
CharPosInputStream(InputStream r)
Creates a new CharPosInputStream. |
|
| Method Summary | |
|---|---|
void |
close()
|
int |
getCharPos()
Get the character position (1-based) for the next character to read. |
int |
getColumn()
Get the column (1-based) for the next character to read. |
int |
getLineNo()
Get the line number (1-based) for the next character to read. |
int |
read()
|
int |
read(byte[] buf,
int off,
int len)
|
| Methods inherited from class java.io.InputStream |
|---|
available, 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 |
|---|
public CharPosInputStream(InputStream r)
| Method Detail |
|---|
public int getLineNo()
public int getColumn()
public int getCharPos()
public int read()
throws IOException
read in class InputStreamIOException
public int read(byte[] buf,
int off,
int len)
throws IOException
read in class InputStreamIOException
public void close()
throws IOException
close in interface Closeableclose in class InputStreamIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||