de.dante.extex.backend.documentWriter.postscript.util
Class HeaderManager

java.lang.Object
  extended byde.dante.extex.backend.documentWriter.postscript.util.HeaderManager

public class HeaderManager
extends java.lang.Object

The header manager keeps track of the headers for the PostScript file.

Version:
$Revision: 1.2 $
Author:
Gerd Neugebauer

Constructor Summary
HeaderManager()
          Creates a new object.
 
Method Summary
 void add(java.io.InputStream stream, java.lang.String name)
          Add the contents read from a stream to the headers.
 void add(java.lang.String value, java.lang.String name)
          Add a string to the headers.
 void reset()
          Clear the header buffer and discard its previous contents.
 void write(java.io.OutputStream stream)
          Write the accumulated headers to the output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderManager

public HeaderManager()
Creates a new object.

Method Detail

add

public void add(java.io.InputStream stream,
                java.lang.String name)
         throws java.io.IOException
Add the contents read from a stream to the headers.

Parameters:
stream - the stream to read from
name - the name of the stream
Throws:
java.io.IOException - in case of an error during the writing

add

public void add(java.lang.String value,
                java.lang.String name)
         throws java.io.IOException
Add a string to the headers.

Parameters:
value - the string to add
name - the name for the DSC
Throws:
java.io.IOException - in case of an error during the writing

reset

public void reset()
Clear the header buffer and discard its previous contents.


write

public void write(java.io.OutputStream stream)
           throws java.io.IOException
Write the accumulated headers to the output stream.

Parameters:
stream - the target stream
Throws:
java.io.IOException - in case of an IO error