|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Reader echopoint.ui.template.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.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 fromMethod Detail |
public void close() throws java.io.IOException
java.io.IOException
Reader.close()
public long getLineNumber()
setLineNumber(int)
public long getPosition()
public void mark(int readAheadLimit) throws java.io.IOException
java.io.IOException
Reader.mark(int)
public boolean markSupported()
Reader.markSupported()
public int read() throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic int read(char[] cbuff, int off, int len) throws java.io.IOException
cbuff
- Destination bufferoff
- Offset at which to start storing characterslen
- Maximum number of characters to read
java.io.IOException
- If an I/O error occurspublic int read(char[] cbuff) throws java.io.IOException
java.io.IOException
Reader.read(char[])
public boolean ready() throws java.io.IOException
java.io.IOException
Reader.ready()
public void reset() throws java.io.IOException
java.io.IOException
Reader.reset()
public void setLineNumber(int lineNumber)
lineNumber
- an int specifying the line number.getLineNumber()
public long skip(long n) throws java.io.IOException
java.io.IOException
Reader.skip(long)
public java.lang.String toString()
Object.toString()
public java.io.Reader getReader()
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |