I do not want to save the XFDF - which I already have in memory - to a temporary file, just to load it back into memory a little later.
Is there a way to read the data of the XFDF string (into an FDFDoc) directly from the String itself or a Stream?
I tried to use one the FDFDoc constructors, but to no avail. With new FDFDoc(new FileInputStream("/path/to/file.xfdf")) I am getting the following Exception:
`
Message: Header not found
Conditional expression: false
Filename : Parser.cpp
Function : trn::SDF::Parser::SkipHeader
Linenumber : 759
Error code : 0
at pdftron.FDF.FDFDoc.FDFDocCreate(Native Method)
at pdftron.FDF.FDFDoc.(FDFDoc.java:59)
`
So appearantly FDFDoc-Constructors are not for XFDF data.
FDFDoc.CreateFromXFDF can take either XFDF data represented as a string or it may be a filename on disk. The latter will be attempted if the string is not valid XFDF.