de.dante.extex.backend.outputStream
Class TrivialOutputFactory

java.lang.Object
  extended byde.dante.extex.backend.outputStream.TrivialOutputFactory
All Implemented Interfaces:
OutputStreamFactory

public class TrivialOutputFactory
extends java.lang.Object
implements OutputStreamFactory

The trivial output stream factory is not configurable. It just creates files in the current directory.

Version:
$Revision: 1.1 $
Author:
Gerd Neugebauer

Constructor Summary
TrivialOutputFactory()
          Creates a new object.
 
Method Summary
 java.io.OutputStream getOutputStream(java.lang.String name, java.lang.String type)
          Getter for a new OutputStream.
 void register(OutputStreamObserver observer)
          Register an observer which is invoked to notify about any output stream requested via a call to getOututStream(),
 void setExtension(java.lang.String extension)
          Setter for the default extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrivialOutputFactory

public TrivialOutputFactory()
Creates a new object.

Method Detail

getOutputStream

public java.io.OutputStream getOutputStream(java.lang.String name,
                                            java.lang.String type)
                                     throws DocumentWriterException
Description copied from interface: OutputStreamFactory
Getter for a new OutputStream.

Specified by:
getOutputStream in interface OutputStreamFactory
Parameters:
name - the name segment to characterize the stream externally. This segment might be used as part of the output file. If the name is null then it is treated as not given at all.
type - the type of the stream to acquire. In general this should correspond to the extension of a file of this type
Returns:
the new OutputStream
Throws:
DocumentWriterException - in case of an error
See Also:
OutputStreamFactory.getOutputStream( java.lang.String, java.lang.String)

register

public void register(OutputStreamObserver observer)
Description copied from interface: OutputStreamFactory
Register an observer which is invoked to notify about any output stream requested via a call to getOututStream(),

Specified by:
register in interface OutputStreamFactory
Parameters:
observer - the observers to register
See Also:
OutputStreamFactory.register( de.dante.extex.backend.outputStream.OutputStreamObserver)

setExtension

public void setExtension(java.lang.String extension)
Description copied from interface: OutputStreamFactory
Setter for the default extension. The default extension is used when the type specified is null.

Specified by:
setExtension in interface OutputStreamFactory
Parameters:
extension - the default extension
See Also:
OutputStreamFactory.setExtension( java.lang.String)