org.extex.main.tex
Class FileRecorder

java.lang.Object
  extended by org.extex.main.tex.FileRecorder
All Implemented Interfaces:
OutputStreamObserver, OpenFileObserver

public class FileRecorder
extends java.lang.Object
implements OpenFileObserver, OutputStreamObserver

This observer records that a certain file has been opened.

Version:
$Revision:4708 $
Author:
Gerd Neugebauer

Constructor Summary
FileRecorder()
          Creates a new object.
 
Method Summary
 void print(java.lang.String name)
          Print the recorded files to a file or stream.
 void setOutputFactory(OutputFactory outputFactory)
          Setter for outputFactory.
 void update(java.lang.String name, java.lang.String filetype, java.io.InputStream stream)
          This method is meant to be invoked just after a new file based stream has been opened.
 void update(java.lang.String name, java.lang.String type, java.io.OutputStream stream)
          Recognize that a new output stream has been delivered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileRecorder

public FileRecorder()
Creates a new object.

Method Detail

print

public void print(java.lang.String name)
           throws java.io.IOException,
                  DocumentWriterException
Print the recorded files to a file or stream.

Parameters:
name - the name of the output file or null for stdout
Throws:
java.io.IOException - in case of an I/O error
DocumentWriterException - in case of an error in the output factory

setOutputFactory

public void setOutputFactory(OutputFactory outputFactory)
Setter for outputFactory.

Parameters:
outputFactory - the outputFactory to set

update

public void update(java.lang.String name,
                   java.lang.String filetype,
                   java.io.InputStream stream)
This method is meant to be invoked just after a new file based stream has been opened.

Specified by:
update in interface OpenFileObserver
Parameters:
name - the name of the file to be opened
filetype - the type of the file to be opened. The type is resolved via the configuration to a file name pattern
stream - the input stream to read from
See Also:
OpenFileObserver.update(java.lang.String, java.lang.String, java.io.InputStream)

update

public void update(java.lang.String name,
                   java.lang.String type,
                   java.io.OutputStream stream)
Recognize that a new output stream has been delivered.

Specified by:
update in interface OutputStreamObserver
Parameters:
name - the name of the resource requested
type - the type of the resource
stream - the stream to be delivered
See Also:
OutputStreamObserver.update(java.lang.String, java.lang.String, java.io.OutputStream)