de.dante.extex.interpreter.type.file
Class OutFile

java.lang.Object
  extended byde.dante.extex.interpreter.type.file.OutFile
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ExecuteFile, LogFile, UserAndLogFile

public class OutFile
extends java.lang.Object
implements java.io.Serializable

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

Version:
$Revision: 1.15 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
OutFile(java.io.File name)
          Creates a new object.
 
Method Summary
 void close()
          Close the current file.
 boolean isOpen()
          Check whether the output file is open.
 void open()
          Open the current file.
 void write(Tokens toks)
          Write some tokens to the output writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

OutFile

public OutFile(java.io.File name)
Creates a new object.

Parameters:
name - the file to write to
Method Detail

close

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

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

isOpen

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

Returns:
true iff the instance is open

open

public void open()
Open the current file.


write

public void write(Tokens toks)
           throws InterpreterException,
                  java.io.IOException
Write some tokens to the output writer.

Parameters:
toks - tokens to write
Throws:
InterpreterException - in case of an error
java.io.IOException - in case of an IO error