DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6863>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
Advertising
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6863
FOP does not close file stream, hence cannot delete XML file
Summary: FOP does not close file stream, hence cannot delete XML
file
Product: Fop
Version: all
Platform: PC
OS/Version: Other
Status: NEW
Severity: Major
Priority: Other
Component: pdf renderer
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
Hi
I am using the code shown below. The "xmlFile" is an argument of type File to
the method where this code is executed. Once this method completes I am calling
xmlFile.delete (); The problem is that the file does not get deleted and the
boolean returned by the xmlFile.delete method is false. I am guessing that
either the render or the InputHandler are not closing the file stream, hence it
is not closing the file. If I comment the call to this method where I do the
XSL processing, I can delete the XML file successfully; so it is not related to
file permissions etc.
Driver driver = new Driver();
driver.setRenderer(Driver.RENDER_PDF);
File xslFile = new File (xslFileName);
InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile);
XMLReader parser = inputHandler.getParser();
driver.setOutputStream(out);
driver.render(parser, inputHandler.getInputSource());
driver.reset();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]