public class FDFDocument
extends java.lang.Object
| Constructor and Description |
|---|
FDFDocument()
Constructor, creates a new FDF document.
|
FDFDocument(COSDocument doc)
Constructor that uses an existing document.
|
FDFDocument(org.w3c.dom.Document doc)
This will create an FDF document from an XFDF XML document.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This will close the underlying COSDocument object.
|
FDFCatalog |
getCatalog()
This will get the FDF Catalog.
|
COSDocument |
getDocument()
This will get the low level document.
|
static FDFDocument |
load(java.io.File file)
This will load a document from a file.
|
static FDFDocument |
load(java.io.InputStream input)
This will load a document from an input stream.
|
static FDFDocument |
load(java.lang.String filename)
This will load a document from a file.
|
static FDFDocument |
loadXFDF(java.io.File file)
This will load a document from a file.
|
static FDFDocument |
loadXFDF(java.io.InputStream input)
This will load a document from an input stream.
|
static FDFDocument |
loadXFDF(java.lang.String filename)
This will load a document from a file.
|
void |
save(java.io.File fileName)
This will save this document to the filesystem.
|
void |
save(java.io.OutputStream output)
This will save the document to an output stream.
|
void |
save(java.lang.String fileName)
This will save this document to the filesystem.
|
void |
saveXFDF(java.io.File fileName)
This will save this document to the filesystem.
|
void |
saveXFDF(java.lang.String fileName)
This will save this document to the filesystem.
|
void |
saveXFDF(java.io.Writer output)
This will save the document to an output stream and close the stream.
|
void |
setCatalog(FDFCatalog cat)
This will set the FDF catalog for this FDF document.
|
void |
writeXML(java.io.Writer output)
This will write this element as an XML document.
|
public FDFDocument()
throws java.io.IOException
java.io.IOException - If there is an error creating this document.public FDFDocument(COSDocument doc)
doc - The COSDocument that this document wraps.public FDFDocument(org.w3c.dom.Document doc)
throws java.io.IOException
doc - The XML document that contains the XFDF data.java.io.IOException - If there is an error reading from the dom.public void writeXML(java.io.Writer output)
throws java.io.IOException
output - The stream to write the xml to.java.io.IOException - If there is an error writing the XML.public COSDocument getDocument()
public FDFCatalog getCatalog()
public void setCatalog(FDFCatalog cat)
cat - The FDF catalog.public static FDFDocument load(java.lang.String filename) throws java.io.IOException
filename - The name of the file to load.java.io.IOException - If there is an error reading from the stream.public static FDFDocument load(java.io.File file) throws java.io.IOException
file - The name of the file to load.java.io.IOException - If there is an error reading from the stream.public static FDFDocument load(java.io.InputStream input) throws java.io.IOException
input - The stream that contains the document.java.io.IOException - If there is an error reading from the stream.public static FDFDocument loadXFDF(java.lang.String filename) throws java.io.IOException
filename - The name of the file to load.java.io.IOException - If there is an error reading from the stream.public static FDFDocument loadXFDF(java.io.File file) throws java.io.IOException
file - The name of the file to load.java.io.IOException - If there is an error reading from the stream.public static FDFDocument loadXFDF(java.io.InputStream input) throws java.io.IOException
input - The stream that contains the document.java.io.IOException - If there is an error reading from the stream.public void save(java.io.File fileName)
throws java.io.IOException,
COSVisitorException
fileName - The file to save as.java.io.IOException - If there is an error saving the document.COSVisitorException - If an error occurs while generating the data.public void save(java.lang.String fileName)
throws java.io.IOException,
COSVisitorException
fileName - The file to save as.java.io.IOException - If there is an error saving the document.COSVisitorException - If an error occurs while generating the data.public void save(java.io.OutputStream output)
throws java.io.IOException,
COSVisitorException
output - The stream to write to.java.io.IOException - If there is an error writing the document.COSVisitorException - If an error occurs while generating the data.public void saveXFDF(java.io.File fileName)
throws java.io.IOException,
COSVisitorException
fileName - The file to save as.java.io.IOException - If there is an error saving the document.COSVisitorException - If an error occurs while generating the data.public void saveXFDF(java.lang.String fileName)
throws java.io.IOException,
COSVisitorException
fileName - The file to save as.java.io.IOException - If there is an error saving the document.COSVisitorException - If an error occurs while generating the data.public void saveXFDF(java.io.Writer output)
throws java.io.IOException,
COSVisitorException
output - The stream to write to.java.io.IOException - If there is an error writing the document.COSVisitorException - If an error occurs while generating the data.public void close()
throws java.io.IOException
java.io.IOException - If there is an error releasing resources.