Class InputCharStream

java.lang.Object
org.exolab.castor.xml.dtd.parser.InputCharStream
All Implemented Interfaces:
CharStream

public final class InputCharStream extends Object implements CharStream
An implementation of interface CharStream. Implements input character stream that maintains line and column number positions of the characters. It also has the capability to backup the stream to some extent.
The object of this class is constructed using java.io.Reader reader and it is left to constructor of the reader to set up character encoding correctly. This means that method read of the reader is used to get next characters, assuming it returns appropriate values. It is recommended to use class java.io.InputStreamReader as a reader, which allows to set desired character encoding. This class is an intermediate component between input character reader and the parser.
The code of this class is based on the class ASCII_CharStream - implementation of interface CharStream, that JavaCC would have generated with the following options set in a JavaCC grammar file:
 JAVA_UNICODE_ESCAPE = false;
 UNICODE_INPUT = false;
 USER_CHAR_STREAM = false;
 
Note that this class is not fully JavaCC generated.
Version:
$Revision$ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
Author:
JavaCC, Alexander Totok