org.extex.scanner.type.file
Interface InFile

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
InputFile

public interface InFile
extends java.io.Serializable

This class holds an input file from which tokens can be read.

Version:
$Revision:4399 $
Author:
Gerd Neugebauer

Method Summary
 void close()
          Close the current stream.
 boolean isEof()
          Checks whether this InFile is at end of file.
 boolean isFileStream()
          Check if this stream is attached to a file.
 boolean isOpen()
          Check whether this InFile is currently opened for reading.
 boolean isStandardStream()
          Getter for standardStream.
 Tokens read(TokenFactory factory, Tokenizer tokenizer)
          Read a line of characters into a tokens list.
 

Method Detail

close

void close()
Close the current stream. No reading operation is possible afterwards.


isEof

boolean isEof()
              throws HelpingException
Checks whether this InFile is at end of file.

Returns:
true iff no further token can be read.
Throws:
HelpingException - in case of an error

isFileStream

boolean isFileStream()
Check if this stream is attached to a file.

Returns:
true if this stream reads from a file

isOpen

boolean isOpen()
Check whether this InFile is currently opened for reading.

Returns:
true iff the input stream has still a stream assigned to it.

isStandardStream

boolean isStandardStream()
Getter for standardStream.

Returns:
the standardStream

read

Tokens read(TokenFactory factory,
            Tokenizer tokenizer)
            throws HelpingException
Read a line of characters into a tokens list.

Parameters:
factory - the factory to request new tokens from
tokenizer - the tokenizer to use
Returns:
the tokens read or null in case of eof
Throws:
HelpingException - in case of an error