|
|||||||||
| Home >> All >> org >> eclipse >> ant >> internal >> ui >> editor >> [ derived overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.ant.internal.ui.editor.derived
Class SubstitutionTextReader

java.lang.Objectjava.io.Reader
org.eclipse.ant.internal.ui.editor.derived.SingleCharReader
org.eclipse.ant.internal.ui.editor.derived.SubstitutionTextReader
- Direct Known Subclasses:
- HTML2TextReader
- public abstract class SubstitutionTextReader
- extends SingleCharReader
Reads the text contents from a reader and computes for each character a potential substitution. The substitution may eat more characters than only the one passed into the computation routine.
| Field Summary | |
private java.lang.StringBuffer |
fBuffer
|
private int |
fCharAfterWhiteSpace
|
private int |
fIndex
|
private java.io.Reader |
fReader
|
private boolean |
fReadFromBuffer
|
private boolean |
fSkipWhiteSpace
Tells whether white space characters are skipped. |
private boolean |
fWasWhiteSpace
|
protected static java.lang.String |
LINE_DELIM
|
| Fields inherited from class java.io.Reader |
lock |
| Constructor Summary | |
protected |
SubstitutionTextReader(java.io.Reader reader)
|
| Method Summary | |
void |
close()
Closes the stream. |
protected abstract java.lang.String |
computeSubstitution(int c)
Implement to compute the substitution for the given character and if necessary subsequent characters. |
protected java.io.Reader |
getReader()
Returns the internal reader. |
protected boolean |
isSkippingWhitespace()
|
protected int |
nextChar()
Returns the next character. |
int |
read()
Reads an char from the input stream and returns it as an int in the range of 0-65535. |
boolean |
ready()
Determines whether or not this stream is ready to be read. |
void |
reset()
Resets a stream to the point where the mark()
method was called. |
protected void |
setSkipWhitespace(boolean state)
|
| Methods inherited from class org.eclipse.ant.internal.ui.editor.derived.SingleCharReader |
getString, read |
| Methods inherited from class java.io.Reader |
mark, markSupported, read, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
LINE_DELIM
protected static final java.lang.String LINE_DELIM
fReader
private java.io.Reader fReader
fWasWhiteSpace
private boolean fWasWhiteSpace
fCharAfterWhiteSpace
private int fCharAfterWhiteSpace
fSkipWhiteSpace
private boolean fSkipWhiteSpace
- Tells whether white space characters are skipped.
fReadFromBuffer
private boolean fReadFromBuffer
fBuffer
private java.lang.StringBuffer fBuffer
fIndex
private int fIndex
| Constructor Detail |
SubstitutionTextReader
protected SubstitutionTextReader(java.io.Reader reader)
| Method Detail |
computeSubstitution
protected abstract java.lang.String computeSubstitution(int c) throws java.io.IOException
- Implement to compute the substitution for the given character and
if necessary subsequent characters. Use
nextCharto read subsequent characters.
getReader
protected java.io.Reader getReader()
- Returns the internal reader.
nextChar
protected int nextChar()
throws java.io.IOException
- Returns the next character.
read
public int read()
throws java.io.IOException
- Description copied from class:
java.io.Reader - Reads an char from the input stream and returns it
as an int in the range of 0-65535. This method also will return -1 if
the end of the stream has been reached.
This method will block until the char can be read.
- Specified by:
readin classSingleCharReader
ready
public boolean ready()
throws java.io.IOException
- Description copied from class:
java.io.Reader - Determines whether or not this stream is ready to be
read. If it returns
falsethe stream may block if a read is attempted, but it is not guaranteed to do so.This method always returns
falsein this class- Overrides:
readyin classSingleCharReader
close
public void close()
throws java.io.IOException
- Description copied from class:
java.io.Reader - Closes the stream. Any futher attempts to read from the
stream may generate an
IOException.
reset
public void reset()
throws java.io.IOException
- Description copied from class:
java.io.Reader - Resets a stream to the point where the
mark()method was called. Any chars that were read after the mark point was set will be re-read during subsequent reads.This method always throws an IOException in this class, but subclasses can override this method if they provide mark/reset functionality.
setSkipWhitespace
protected final void setSkipWhitespace(boolean state)
isSkippingWhitespace
protected final boolean isSkippingWhitespace()
|
|||||||||
| Home >> All >> org >> eclipse >> ant >> internal >> ui >> editor >> [ derived overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC