SMACS

smacs.xngr.browser.editor
Class XmlInputReader

java.lang.Object
  extended byjava.io.Reader
      extended byjava.io.FilterReader
          extended bysmacs.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

Field Summary
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
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.io.FilterReader
close, mark, markSupported, read, ready, reset, skip
 
Methods inherited from class java.io.Reader
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.

SMACS