com.lowagie.rups.view.itext.treenodes

Class XfaTreeNode

public class XfaTreeNode extends FormTreeNode implements OutputStreamResource

This is the root tree node for the different parts of the XFA resource; it's a child of the root in the FormTree. This resource can be one XDP stream (in which case this root will only have one child) or different streams with individual packets comprising the XML Data Package.
Field Summary
static byte[]BOUNDARY_END
End sequence of an artificial boundary between XFA fragments added by RUPS
static byte[]BOUNDARY_MIDDLE
Middle sequence of an artificial boundary between XFA fragments added by RUPS
static byte[]BOUNDARY_START
Start sequence of an artificial boundary between XFA fragments added by RUPS
static longserialVersionUID
A serial version UID.
Constructor Summary
XfaTreeNode(PdfObjectTreeNode xfa)
Creates the root node of the XFA tree.
Method Summary
voidaddPacket(String key, PdfObjectTreeNode value)
Adds a child node to the XFA root.
voidwriteTo(OutputStream os)
Writes (part of) the XFA resource to an OutputStream.

Field Detail

BOUNDARY_END

public static final byte[] BOUNDARY_END
End sequence of an artificial boundary between XFA fragments added by RUPS

BOUNDARY_MIDDLE

public static final byte[] BOUNDARY_MIDDLE
Middle sequence of an artificial boundary between XFA fragments added by RUPS

BOUNDARY_START

public static final byte[] BOUNDARY_START
Start sequence of an artificial boundary between XFA fragments added by RUPS

serialVersionUID

private static final long serialVersionUID
A serial version UID.

Constructor Detail

XfaTreeNode

public XfaTreeNode(PdfObjectTreeNode xfa)
Creates the root node of the XFA tree. This will be a child of the FormTree root node.

Parameters: xfa the XFA node in the PdfTree (a child of the AcroForm node in the PDF catalog)

Method Detail

addPacket

public void addPacket(String key, PdfObjectTreeNode value)
Adds a child node to the XFA root. The child node either corresponds with the complete XDP stream (if the XFA root only has one child) or with individual packet.

Parameters: key the name of the packet value the corresponding stream node in the PdfTree

writeTo

public void writeTo(OutputStream os)
Writes (part of) the XFA resource to an OutputStream. If key is null, the complete resource is written; if key refers to an individual package, this package only is written to the OutputStream.

Parameters: os the OutputStream to which the XML is written.

Throws: IOException usual exception when there's a problem writing to an OutputStream