org.extex.scanner.type.file
Interface OutFile

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ExecuteFile, LogFile, OutputFile, UserAndLogFile

public interface OutFile
extends java.io.Serializable

This class holds an output file onto which tokens can be written.

Version:
$Revision: 6283 $
Author:
Gerd Neugebauer

Method Summary
 void close()
          Close the current file.
 boolean isOpen()
          Check whether the output file is open.
 void newline()
          Write out a newline.
 void open(java.lang.String key, java.lang.String encoding, TokenStreamFactory factory)
          Open the current file.
 boolean write(Tokens toks)
          Write some tokens to the output writer.
 

Method Detail

close

void close()
           throws java.io.IOException
Close the current file.

Throws:
java.io.IOException - in case of an error

isOpen

boolean isOpen()
Check whether the output file is open.

Returns:
true iff the instance is open

open

void open(java.lang.String key,
          java.lang.String encoding,
          TokenStreamFactory factory)
          throws java.io.UnsupportedEncodingException
Open the current file.

Parameters:
key - the key
encoding - the encoding or null for the default encoding
factory - the token stream factory
Throws:
java.io.UnsupportedEncodingException - in case of an invalid encoding

newline

void newline()
             throws java.io.IOException
Write out a newline.

Throws:
java.io.IOException - in case of an error

write

boolean write(Tokens toks)
              throws HelpingException,
                     java.io.IOException
Write some tokens to the output writer.

Parameters:
toks - tokens to write
Returns:
true iff the writing was successful
Throws:
HelpingException - in case of an error
java.io.IOException - in case of an IO error