[Home] [By Thread] [By Date] [Recent Entries]

  • To: <xml-dev@l...>
  • Subject: File locked by Driver.render?
  • From: "Miguel Sanz" <msanz@b...>
  • Date: Mon, 8 Apr 2002 10:12:09 +0200


Hi! I have a problem with FOP
 
I have an aplication which generates a temporary XML for generating a PDF document. After doing that, the XML file is removed.
It worked right with FOP 0.18.1. Now I've had to update it to FOP 0.20.3rc and it doesn't work propertly.
The problem is that after using the  Driver.render method the XML file is locked and I can´t delete it (and I NEED to do it)
 
Here's the code around the driver.render that causes de trouble.
 
        driver.setErrorDump(true);
        driver.setRenderer(Driver.RENDER_PDF);
        driver.setOutputStream(out);
 
// <--- Here I can delete de XML file
 
        driver.render(xsltPfInput.getParser(), xsltPfInput.getInputSource());
 
        byte[] content = out.toByteArray();
 
        objPfResponse.setContentLength(content.length);
        objPfResponse.getOutputStream().write(content);
 
        objPfResponse.getOutputStream().flush();
        objPfResponse.getOutputStream().close();
        out.close();
 
// <--- Here I can't delete de XML file
 
Thanks for any sugestions

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member