org.eclipse.mylar.internal.tasks.ui.util
Class SubstitutionTextReader
java.lang.Object
java.io.Reader
org.eclipse.mylar.internal.tasks.ui.util.SingleCharReader
org.eclipse.mylar.internal.tasks.ui.util.SubstitutionTextReader
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Readable
- Direct Known Subclasses:
- HTML2TextReader
public abstract class SubstitutionTextReader
- extends SingleCharReader
COPY OF: org.eclipse.jface.internal.text.html.HTML2TextReader
Fields inherited from class java.io.Reader |
lock |
Methods inherited from class java.io.Reader |
mark, markSupported, read, read, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LINE_DELIM
protected static final java.lang.String LINE_DELIM
fReader
private java.io.Reader fReader
fWasWhiteSpace
protected 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
SubstitutionTextReader
protected SubstitutionTextReader(java.io.Reader reader)
computeSubstitution
protected abstract java.lang.String computeSubstitution(int c)
throws java.io.IOException
- Computes the substitution for the given character and if necessary
subsequent characters. Implementation should use
nextChar
to read subsequent characters.
- Parameters:
c
- the character to be substituted
- Returns:
- the substitution for
c
- Throws:
java.io.IOException
- in case computing the substitution fails
getReader
protected java.io.Reader getReader()
- Returns the internal reader.
- Returns:
- the internal reader
nextChar
protected int nextChar()
throws java.io.IOException
- Returns the next character.
- Returns:
- the next character
- Throws:
java.io.IOException
- in case reading the character fails
read
public int read()
throws java.io.IOException
- Specified by:
read
in class SingleCharReader
- Throws:
java.io.IOException
- See Also:
Reader.read()
ready
public boolean ready()
throws java.io.IOException
- Overrides:
ready
in class SingleCharReader
- Throws:
java.io.IOException
- See Also:
Reader.ready()
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in class java.io.Reader
- Throws:
java.io.IOException
- See Also:
Reader.close()
reset
public void reset()
throws java.io.IOException
- Overrides:
reset
in class java.io.Reader
- Throws:
java.io.IOException
- See Also:
Reader.reset()
setSkipWhitespace
protected final void setSkipWhitespace(boolean state)
isSkippingWhitespace
protected final boolean isSkippingWhitespace()