|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pdfbox.pdmodel.fdf.FDFDocument
This is the in-memory representation of the FDF document. You need to call close() on this object when you are done using it!!
Constructor Summary | |
FDFDocument()
Constructor, creates a new FDF document. |
|
FDFDocument(COSDocument doc)
Constructor that uses an existing document. |
|
FDFDocument(Document doc)
This will create an FDF document from an XFDF XML document. |
Method Summary | |
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(File file)
This will load a document from a file. |
static FDFDocument |
load(InputStream input)
This will load a document from an input stream. |
static FDFDocument |
load(String filename)
This will load a document from a file. |
static FDFDocument |
loadXFDF(File file)
This will load a document from a file. |
static FDFDocument |
loadXFDF(InputStream input)
This will load a document from an input stream. |
static FDFDocument |
loadXFDF(String filename)
This will load a document from a file. |
void |
save(File fileName)
This will save this document to the filesystem. |
void |
save(OutputStream output)
This will save the document to an output stream. |
void |
save(String fileName)
This will save this document to the filesystem. |
void |
saveXFDF(File fileName)
This will save this document to the filesystem. |
void |
saveXFDF(String fileName)
This will save this document to the filesystem. |
void |
saveXFDF(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(Writer output)
This will write this element as an XML document. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FDFDocument() throws IOException
IOException
- If there is an error creating this document.public FDFDocument(COSDocument doc)
doc
- The COSDocument that this document wraps.public FDFDocument(Document doc) throws IOException
doc
- The XML document that contains the XFDF data.
IOException
- If there is an error reading from the dom.Method Detail |
public void writeXML(Writer output) throws IOException
output
- The stream to write the xml to.
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(String filename) throws IOException
filename
- The name of the file to load.
IOException
- If there is an error reading from the stream.public static FDFDocument load(File file) throws IOException
file
- The name of the file to load.
IOException
- If there is an error reading from the stream.public static FDFDocument load(InputStream input) throws IOException
input
- The stream that contains the document.
IOException
- If there is an error reading from the stream.public static FDFDocument loadXFDF(String filename) throws IOException
filename
- The name of the file to load.
IOException
- If there is an error reading from the stream.public static FDFDocument loadXFDF(File file) throws IOException
file
- The name of the file to load.
IOException
- If there is an error reading from the stream.public static FDFDocument loadXFDF(InputStream input) throws IOException
input
- The stream that contains the document.
IOException
- If there is an error reading from the stream.public void save(File fileName) throws IOException, COSVisitorException
fileName
- The file to save as.
IOException
- If there is an error saving the document.
COSVisitorException
- If an error occurs while generating the data.public void save(String fileName) throws IOException, COSVisitorException
fileName
- The file to save as.
IOException
- If there is an error saving the document.
COSVisitorException
- If an error occurs while generating the data.public void save(OutputStream output) throws IOException, COSVisitorException
output
- The stream to write to.
IOException
- If there is an error writing the document.
COSVisitorException
- If an error occurs while generating the data.public void saveXFDF(File fileName) throws IOException, COSVisitorException
fileName
- The file to save as.
IOException
- If there is an error saving the document.
COSVisitorException
- If an error occurs while generating the data.public void saveXFDF(String fileName) throws IOException, COSVisitorException
fileName
- The file to save as.
IOException
- If there is an error saving the document.
COSVisitorException
- If an error occurs while generating the data.public void saveXFDF(Writer output) throws IOException, COSVisitorException
output
- The stream to write to.
IOException
- If there is an error writing the document.
COSVisitorException
- If an error occurs while generating the data.public void close() throws IOException
IOException
- If there is an error releasing resources.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |