Update:

Tried a 20kb file and the same problem.  Seems like whenever a SAXException
is thrown the Xerces SAXParser does not release the reference to the file.
We saw when the files were tiny, 5kb or so those seem to be okay.

Thanks,

Rob


-----Original Message-----
From: Rob Outar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 11:15 AM
To: [EMAIL PROTECTED]
Subject: XMLReader not releasing file reference


Hi all,

        I have an application that only needs to read preprocessing instructions
from an XML file.  Since I am only interested in Processing Instructions
when I encounter the start element I throw a SAX Exception to abort parsing:

  public void startElement(String uri, String localName, String qName,
        Attributes attributes)  throws SAXException {
            throw new SAXException("Abort Parsing");

Once this exception is encountered by the client application I then try to
delete the XML file, some of the XML files I read can be deleted while
others cannot.  The problem seems to occur on large files ( > 200kb )....
Is there any reason the XMLReader would maintain the file reference?  I am
not sure what is happening as I mentioned usually all of the smaller files
are deleted just fine but larger ones seem to have a file reference and
File.delete() fails (return false).

Any help would be appreciated.

Thanks,

Rob


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to