de.dante.extex.backend.documentWriter.dvi
Class DviDocumentWriter

java.lang.Object
  extended byde.dante.extex.backend.documentWriter.dvi.DviDocumentWriter
All Implemented Interfaces:
DocumentWriter, Localizable, SingleDocumentStream

public class DviDocumentWriter
extends java.lang.Object
implements DocumentWriter, SingleDocumentStream, Localizable

This is a implementation of a dvi document writer.

Version:
$Revision: 1.2 $
Author:
Sebastian Waschik

Constructor Summary
DviDocumentWriter(Configuration theCfg, DocumentWriterOptions options)
          Creates a new instance.
 
Method Summary
 void close()
          This method is invoked upon the end of the processing.
 void enableLocalization(Localizer theLocalizer)
          Set the Localizer method here.
 java.lang.String getExtension()
          Getter for the extension associated with dvi output.
 int getPages()
          Get the number of written pages until now.
 void setOutputStream(java.io.OutputStream writer)
          Setter for the output stream.
 void setParameter(java.lang.String name, java.lang.String value)
          Setter of an named parameter.
 int shipout(Page page)
          This is the entry point for the document writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DviDocumentWriter

public DviDocumentWriter(Configuration theCfg,
                         DocumentWriterOptions options)
Creates a new instance.

Parameters:
theCfg - configuration of ExTeX
options - options for DviDocumentWriter
Method Detail

close

public void close()
           throws GeneralException,
                  java.io.IOException
This method is invoked upon the end of the processing. End of dvi file is written.

Specified by:
close in interface DocumentWriter
Throws:
GeneralException - if an error occurs
java.io.IOException - if an error occurs

enableLocalization

public void enableLocalization(Localizer theLocalizer)
Set the Localizer method here.

Specified by:
enableLocalization in interface Localizable
Parameters:
theLocalizer - a Localizer value
See Also:
Localizable.enableLocalization( de.dante.util.framework.i18n.Localizer)

getExtension

public java.lang.String getExtension()
Getter for the extension associated with dvi output.

Specified by:
getExtension in interface DocumentWriter
Returns:
normally "dvi"

getPages

public int getPages()
Get the number of written pages until now.

Returns:
the number of written pages

setOutputStream

public void setOutputStream(java.io.OutputStream writer)
Setter for the output stream. This method throws no exception. If somethings goes wrong shipout(NodeList) informs the caller.

Specified by:
setOutputStream in interface SingleDocumentStream
Parameters:
writer - an OutputStream value

setParameter

public void setParameter(java.lang.String name,
                         java.lang.String value)
Setter of an named parameter. This Documentwriter supports no parameters yet.

Specified by:
setParameter in interface DocumentWriter
Parameters:
name - a String value
value - a String value

shipout

public int shipout(Page page)
            throws GeneralException,
                   java.io.IOException
This is the entry point for the document writer. Exceptions of the initialisation of the class will be thrown here.

Specified by:
shipout in interface DocumentWriter
Parameters:
page - the Page to send
Returns:
number of pages
Throws:
GeneralException - if an error occurs
java.io.IOException - if an error occurs