|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavafe.util.CorrelatedReader
javafe.util.FilterCorrelatedReader
This CorrelatedReader is built on top of another, given CorrelatedReader. All of the methods in this class simply call the corresponding methods on the underlying CorrelatedReader.
CorrelatedReader| Field Summary | |
protected CorrelatedReader |
child
|
| Fields inherited from class javafe.util.CorrelatedReader |
marked |
| Constructor Summary | |
protected |
FilterCorrelatedReader(CorrelatedReader child)
Constructs a FilterCorrelatedReader with child as the
underlying CorrelatedReader. |
| Method Summary | |
void |
clearMark()
See documentation in superclass. |
void |
close()
Closes us. |
CorrelatedReader |
createReaderFromMark(int discard)
Creates a CorrelatedReader object for the input
text from the marked position, to the current position. |
GenericFile |
getFile()
Returns the file underlying this correlated reader. |
int |
getLocation()
Returns the location of the last character read. |
void |
mark()
See documentation in superclass. |
int |
read()
Reads the next character from this input stream. |
void |
reset()
See documentation in superclass. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected CorrelatedReader child
| Constructor Detail |
protected FilterCorrelatedReader(CorrelatedReader child)
child as the
underlying CorrelatedReader. After calling this constructor, the
caller should no longer use child directly.
| Method Detail |
public GenericFile getFile()
getFile in class CorrelatedReaderpublic int getLocation()
getLocation in class CorrelatedReaderpublic void mark()
mark in class CorrelatedReaderCorrelatedReader.reset(),
CorrelatedReader.clearMark(),
CorrelatedReader.createReaderFromMark(int)public void clearMark()
clearMark in class CorrelatedReaderCorrelatedReader.mark()
public void reset()
throws java.io.IOException
reset in class CorrelatedReaderjava.io.IOException - if this stream is not marked.CorrelatedReader.mark()
public CorrelatedReader createReaderFromMark(int discard)
throws java.lang.IndexOutOfBoundsException
CorrelatedReaderCorrelatedReader object for the input
text from the marked position, to the current position.
Calls to getLocation() for characters from the
new CorrelatedReader yield the same locations as
calls to getLocation() for the same characters on
this CorrelatedReader.
The discard argument specifies the number of
characters to discard from the end of the
sub-CorrelatedReader.
Clears the mark as a side-effect.
Requires that the input stream had been previously marked via
the mark() method and that we have not been
closed.
createReaderFromMark in class CorrelatedReaderjava.lang.IndexOutOfBoundsException - if discard is
negative or exceeds the number of marked charactersBufferedCorrelatedReader.mark()public void close()
close in class CorrelatedReader
public int read()
throws java.io.IOException
Requires we are open.
read in class CorrelatedReader
java.io.IOException
|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||