JRAP File Close

0 views
Skip to first unread message

Scooter

unread,
Nov 30, 2009, 1:11:55 PM11/30/09
to spctools-discuss
We are using the newer JRAP mzXML parsing code in a servlet for a web
based application and had a problem with running out of file handles
for the process. Servlet container is always running so closing of
open file handles was not occurring.

Looked in the MSXMLParser code and noticed that fileIN = new
FileInputStream(fileName); was being called but the fileIN was never
closed. This occurs for each call to rapHeader(int scanNumber) so the
file open count would add up quickly. The same is true for
XMLStreamReader xmlSR where it is not being closed either. I ended up
adding close in MSXMLParser, ScanAndHeaderParser,
MLScanAndHeaderParser, and FileHeaderParser.

It is a fairly easy code fix so I thought I would be easier to let a
current developer know who can easily make the fix and check back in.

Thanks

Scooter
Reply all
Reply to author
Forward
0 new messages