diva.gui
Class MultipageWriter

java.lang.Object
  extended by diva.gui.MultipageWriter

public class MultipageWriter
extends java.lang.Object

MultipageWriter writes out all pages of a multi-page document to a file. The document writer must be provided with a model writer which is used to write out the app-specific model on a single page.

Version:
$Id: MultipageWriter.java 38798 2005-07-08 20:00:01Z cxh $
Author:
Heloise Hse, Michael Shilman
Accepted Rating:
Red

Field Summary
private  ModelWriter _modelWriter
          Model parser is used to parse the content of a page.
 
Constructor Summary
MultipageWriter(ModelWriter pageWriter)
          Create a MultipageWriter with the specified model parser which is used to write the content of a page.
 
Method Summary
 void write(MultipageModel multipage, java.io.Writer out)
          Write the given document to the character stream (out).
private  void writeHeader(java.io.Writer writer)
          Write out header information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_modelWriter

private ModelWriter _modelWriter
Model parser is used to parse the content of a page.

Constructor Detail

MultipageWriter

public MultipageWriter(ModelWriter pageWriter)
Create a MultipageWriter with the specified model parser which is used to write the content of a page.

Method Detail

write

public void write(MultipageModel multipage,
                  java.io.Writer out)
           throws java.io.IOException
Write the given document to the character stream (out). Use the given page writer to write out each page in the document.

Throws:
java.io.IOException

writeHeader

private void writeHeader(java.io.Writer writer)
                  throws java.io.IOException
Write out header information.

Throws:
java.io.IOException