com.lowagie.text.xml
Class XmlToXXX

java.lang.Object
  extended bycom.lowagie.text.xml.XmlToXXX
Direct Known Subclasses:
XmlToHtml, XmlToPdf, XmlToRtf

public abstract class XmlToXXX
extends Object

Generates an specific file from an iText XML file.

Version:
1.0
Author:
Matt Benson

Field Summary
protected  Rectangle pageSize
           
 
Constructor Summary
  XmlToXXX()
          Construct an XmlToXXX with the default page size.
private XmlToXXX(Rectangle pageSize)
           
  XmlToXXX(String pageSize)
          Construct an XmlToXXX with the specified page size.
 
Method Summary
protected abstract  void addWriter(Document doc, OutputStream out)
          Add a DocWriter for the specified Document and OutputStream.
private static Rectangle getPageSize(String pageSize)
           
 void parse(InputStream in, OutputStream out)
          Parse the XML from the specified InputStream, writing to the specified OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pageSize

protected Rectangle pageSize
Constructor Detail

XmlToXXX

public XmlToXXX()
Construct an XmlToXXX with the default page size.


XmlToXXX

public XmlToXXX(String pageSize)
Construct an XmlToXXX with the specified page size.

Parameters:
pageSize - String page size name from com.lowagie.text.PageSize.

XmlToXXX

private XmlToXXX(Rectangle pageSize)
Method Detail

parse

public final void parse(InputStream in,
                        OutputStream out)
                 throws DocumentException
Parse the XML from the specified InputStream, writing to the specified OutputStream.

Parameters:
in - the InputStream from which the XML is read.
out - the OutputStream to which the result is written.
Throws:
DocumentException - if document errors occur.

getPageSize

private static Rectangle getPageSize(String pageSize)

addWriter

protected abstract void addWriter(Document doc,
                                  OutputStream out)
                           throws DocumentException
Add a DocWriter for the specified Document and OutputStream.

Parameters:
doc - The document to which content will be added
out - The outputstream to which the document will be sent
Throws:
DocumentException - if document errors occur.