smacs.xngr.browser.editor
Class XmlInputReader
java.lang.Object
java.io.Reader
java.io.FilterReader
smacs.xngr.browser.editor.XmlInputReader
- public class XmlInputReader
- extends FilterReader
A Reader for XML input, which can handle escape characters.
Note: The XML Editor package is based on the JavaEditorKit example as
described in the article 'Customizing a Text Editor' by Timothy Prinzing.
See: http://java.sun.com/products/jfc/tsc/articles/text/editor_kit/
- Author:
- Edwin Dankert
|
Constructor Summary |
XmlInputReader(smacs.xngr.browser.editor.XmlInputStream inputstream)
Constructs the new input stream reader out of the Xml
input strem. |
|
Method Summary |
int |
getLastChar()
Returns the last read character. |
int |
read()
Reads one character from the stream and increases
the index. |
void |
setRange(int start,
int end)
Sets the scan range of the reader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlInputReader
public XmlInputReader(smacs.xngr.browser.editor.XmlInputStream inputstream)
throws UnsupportedEncodingException
- Constructs the new input stream reader out of the Xml
input strem.
- Parameters:
inputstream - the XML input stream.
setRange
public void setRange(int start,
int end)
- Sets the scan range of the reader.
- Parameters:
start - the start position.end - the end position.
read
public int read()
throws IOException
- Reads one character from the stream and increases
the index.
- Returns:
- the character or -1 for an eof.
- Throws:
IOException
getLastChar
public int getLastChar()
- Returns the last read character.
- Returns:
- the last read character or -1 for an eof.