This is the in-memory representation of the FDF document. You need to call
close() on this object when you are done using it!!
close
public void close()
throws IOException
This will close the underlying COSDocument object.
getCatalog
public FDFCatalog getCatalog()
This will get the FDF Catalog. This is guaranteed to not return null.
- The documents /Root dictionary
getDocument
public COSDocument getDocument()
This will get the low level document.
- The document that this layer sits on top of.
load
public static FDFDocument load(File file)
throws IOException
This will load a document from a file.
file
- The name of the file to load.
- The document that was loaded.
load
public static FDFDocument load(InputStream input)
throws IOException
This will load a document from an input stream.
input
- The stream that contains the document.
- The document that was loaded.
load
public static FDFDocument load(String filename)
throws IOException
This will load a document from a file.
filename
- The name of the file to load.
- The document that was loaded.
loadXFDF
public static FDFDocument loadXFDF(File file)
throws IOException
This will load a document from a file.
file
- The name of the file to load.
- The document that was loaded.
loadXFDF
public static FDFDocument loadXFDF(InputStream input)
throws IOException
This will load a document from an input stream.
input
- The stream that contains the document.
- The document that was loaded.
loadXFDF
public static FDFDocument loadXFDF(String filename)
throws IOException
This will load a document from a file.
filename
- The name of the file to load.
- The document that was loaded.
save
public void save(File fileName)
throws IOException,
COSVisitorException
This will save this document to the filesystem.
fileName
- The file to save as.
save
public void save(OutputStream output)
throws IOException,
COSVisitorException
This will save the document to an output stream.
output
- The stream to write to.
save
public void save(String fileName)
throws IOException,
COSVisitorException
This will save this document to the filesystem.
fileName
- The file to save as.
saveXFDF
public void saveXFDF(File fileName)
throws IOException,
COSVisitorException
This will save this document to the filesystem.
fileName
- The file to save as.
saveXFDF
public void saveXFDF(String fileName)
throws IOException,
COSVisitorException
This will save this document to the filesystem.
fileName
- The file to save as.
saveXFDF
public void saveXFDF(Writer output)
throws IOException,
COSVisitorException
This will save the document to an output stream and close the stream.
output
- The stream to write to.
setCatalog
public void setCatalog(FDFCatalog cat)
This will set the FDF catalog for this FDF document.
writeXML
public void writeXML(Writer output)
throws IOException
This will write this element as an XML document.
output
- The stream to write the xml to.