java.io.Closeable, java.lang.AutoCloseablepublic class FDFDocument
extends java.lang.Object
implements java.io.Closeable
| Constructor | 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 | 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.io.Writer output) |
This will save the document to an output stream and close the stream.
|
void |
saveXFDF(java.lang.String fileName) |
This will save this document to the filesystem.
|
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()
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
fileName - The file to save as.java.io.IOException - If there is an error saving the document.public void save(java.lang.String fileName)
throws java.io.IOException
fileName - The file to save as.java.io.IOException - If there is an error saving the document.public void save(java.io.OutputStream output)
throws java.io.IOException
output - The stream to write to.java.io.IOException - If there is an error writing the document.public void saveXFDF(java.io.File fileName)
throws java.io.IOException
fileName - The file to save as.java.io.IOException - If there is an error saving the document.public void saveXFDF(java.lang.String fileName)
throws java.io.IOException
fileName - The file to save as.java.io.IOException - If there is an error saving the document.public void saveXFDF(java.io.Writer output)
throws java.io.IOException
output - The stream to write to.java.io.IOException - If there is an error writing the document.public void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOException - If there is an error releasing resources.Copyright © 2002–2018. All rights reserved.