de.dante.extex.scanner.stream.impl32
Class TokenStreamImpl32

java.lang.Object
  extended byde.dante.extex.scanner.stream.impl.TokenStreamBaseImpl
      extended byde.dante.extex.scanner.stream.impl.TokenStreamImpl
          extended byde.dante.extex.scanner.stream.impl32.TokenStreamImpl32
All Implemented Interfaces:
TokenStream

public class TokenStreamImpl32
extends TokenStreamImpl

This class contains an implementation of a token stream which is fed from a Reader.

Version:
$Revision: 1.4 $
Author:
Michael Niedermair
See Also:
TokenStreamImpl

Field Summary
 
Fields inherited from class de.dante.extex.scanner.stream.impl.TokenStreamImpl
CARET_LIMIT, MID_LINE, NEW_LINE, pointer, saveChar, SKIP_BLANKS, state
 
Constructor Summary
TokenStreamImpl32(Configuration config, TokenStreamOptions options, java.io.InputStream stream, java.lang.String theSource, java.lang.String encoding)
          Creates a new object.
TokenStreamImpl32(Configuration config, TokenStreamOptions options, java.io.Reader reader, java.lang.Boolean isFile, java.lang.String theSource)
          Creates a new object.
TokenStreamImpl32(Configuration config, TokenStreamOptions options, java.lang.String theLine, java.lang.String theSource)
          Creates a new object.
 
Method Summary
protected  UnicodeChar getChar(Tokenizer tokenizer)
          Return the next character to process.
 
Methods inherited from class de.dante.extex.scanner.stream.impl.TokenStreamImpl
atEndOfLine, endLine, getLocator, getNext, getRawChar, hex2int, isEof, isEol, refill, toString
 
Methods inherited from class de.dante.extex.scanner.stream.impl.TokenStreamBaseImpl
closeFileStream, get, isFileStream, put, skipSpaces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.dante.extex.scanner.stream.TokenStream
closeFileStream, get, isFileStream, put
 

Constructor Detail

TokenStreamImpl32

public TokenStreamImpl32(Configuration config,
                         TokenStreamOptions options,
                         java.io.InputStream stream,
                         java.lang.String theSource,
                         java.lang.String encoding)
                  throws java.io.IOException,
                         ConfigurationException
Creates a new object.

Parameters:
config - the configuration object for this instance; This configuration is ignored in this implementation.
options - ignored here
theSource - the description of the information source; e.g. the file name
encoding - the encoding to use
stream - the input stream to read
Throws:
ConfigurationException - in case of an error in the configuration
java.io.IOException - in case of an IO error

TokenStreamImpl32

public TokenStreamImpl32(Configuration config,
                         TokenStreamOptions options,
                         java.io.Reader reader,
                         java.lang.Boolean isFile,
                         java.lang.String theSource)
                  throws java.io.IOException
Creates a new object.

Parameters:
config - the configuration object for this instance; This configuration is ignored in this implementation.
options - ignored here
reader - the reader
isFile - indicator for file streams
theSource - the description of the input source
Throws:
java.io.IOException - in case of an IO error

TokenStreamImpl32

public TokenStreamImpl32(Configuration config,
                         TokenStreamOptions options,
                         java.lang.String theLine,
                         java.lang.String theSource)
                  throws java.io.IOException
Creates a new object.

Parameters:
config - the configuration object for this instance; This configuration is ignored in this implementation.
options - ignored here
theLine - the string to use as source for characters
theSource - the description of the input source
Throws:
java.io.IOException - in case of an IO error
Method Detail

getChar

protected UnicodeChar getChar(Tokenizer tokenizer)
                       throws ScannerException
Description copied from class: TokenStreamImpl
Return the next character to process. The pointer is advanced and points to the character returned.

This operation might involve that an additional bunch of characters is read in (with refill()).

Overrides:
getChar in class TokenStreamImpl
Parameters:
tokenizer - the classifier for characters
Returns:
the character or null if no more character is available
Throws:
ScannerException - in the rare case that an IO Exception has occurred.
See Also:
TokenStreamImpl.getChar( de.dante.extex.interpreter.Tokenizer)