|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Reader
echopoint.ui.template.PositionReader
public class PositionReader
A PositionReader can be asked for the
current position in the stream as well as the
current logical line number.
| Field Summary |
|---|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
PositionReader(java.io.Reader r)
Constructs a PositionReader based on a source Reader |
|
| Method Summary | |
|---|---|
void |
close()
|
long |
getLineNumber()
Get the current line number. |
long |
getPosition()
Returns the current position within the file |
java.io.Reader |
getReader()
Returns the underlying Reader |
void |
mark(int readAheadLimit)
|
boolean |
markSupported()
|
int |
read()
Read a single character. |
int |
read(char[] cbuff)
|
int |
read(char[] cbuff,
int off,
int len)
Read characters into a portion of an array. |
boolean |
ready()
|
void |
reset()
|
void |
setLineNumber(int lineNumber)
Set the current line number. |
long |
skip(long n)
|
java.lang.String |
toString()
|
| Methods inherited from class java.io.Reader |
|---|
read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PositionReader(java.io.Reader r)
PositionReader based on a source Reader
r - the Reader to actually read from| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.Readerjava.io.IOExceptionReader.close()public long getLineNumber()
setLineNumber(int)public long getPosition()
public void mark(int readAheadLimit)
throws java.io.IOException
mark in class java.io.Readerjava.io.IOExceptionReader.mark(int)public boolean markSupported()
markSupported in class java.io.ReaderReader.markSupported()
public int read()
throws java.io.IOException
read in class java.io.Readerjava.io.IOException - If an I/O error occurs
public int read(char[] cbuff,
int off,
int len)
throws java.io.IOException
read in class java.io.Readercbuff - Destination bufferoff - Offset at which to start storing characterslen - Maximum number of characters to read
java.io.IOException - If an I/O error occurs
public int read(char[] cbuff)
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionReader.read(char[])
public boolean ready()
throws java.io.IOException
ready in class java.io.Readerjava.io.IOExceptionReader.ready()
public void reset()
throws java.io.IOException
reset in class java.io.Readerjava.io.IOExceptionReader.reset()public void setLineNumber(int lineNumber)
lineNumber - an int specifying the line number.getLineNumber()
public long skip(long n)
throws java.io.IOException
skip in class java.io.Readerjava.io.IOExceptionReader.skip(long)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.io.Reader getReader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||