Bounce

org.bounce.text.xml
Class XMLInputReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.FilterReader
          extended by org.bounce.text.xml.XMLInputReader
All Implemented Interfaces:
Closeable, Readable

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/


Field Summary
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
XMLInputReader(org.bounce.text.xml.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, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLInputReader

public XMLInputReader(org.bounce.text.xml.XMLInputStream inputstream)
Constructs the new input stream reader out of the Xml input strem.

Parameters:
inputstream - the XML input stream.
Throws:
UnsupportedEncodingException
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.

Overrides:
read in class FilterReader
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.

Bounce

Copyright © 2002 - 2007 Edwin Dankert. All Rights Reserved.