Article View: borland.public.jbuilder.java.api
Article #110Re: Too many open files error thrown from java.io.File
From: Owen Green
Date: Sat, 10 Apr 2004 12:24
Date: Sat, 10 Apr 2004 12:24
28 lines
1763 bytes
1763 bytes
On Sun, 4 Apr 2004 18:42:33 -0400, Scott wrote:
> MP3File does not expose the ID3 or ID3v2 tag objects. So I can't read
> MP3.ID3.checkForTag(). I will have to make my own instance (or make my own
> extension of MP3File class to access thed protected fields).
The Mp3 library seems to be open source, so - given that this is fixing a
bug - you would be best off patching the source and rebuilding the library.
You were correct in your idea that try..finally is the way to go. In this
case surround everything after opening the file with a try block, and then
have a finally to close() the file:
RandomAccessFile raf = new RandomAcces..
try
{
//blah blah blah
}
finally
{
raf.close();
}
}//end of method
--
Owen
Technical Details
Message-ID:
<12t5q88i275kw.dlg@borkborkbork.bork>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<406edc6e$1@newsgroups.borland.com> <407073e5$1@newsgroups.borland.com> <40708fae$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,606a3d8ee4cf8a04 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2004-04-10 05:37:48 PST From: Owen Green <o.t.green@ntlworld.com> Subject: Re: Too many open files error thrown from java.io.File Newsgroups: borland.public.jbuilder.java.api MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit References: <406edc6e$1@newsgroups.borland.com> <407073e5$1@newsgroups.borland.com> <40708fae$1@newsgroups.borland.com> Date: Sat, 10 Apr 2004 13:24:46 +0100 Message-ID: <12t5q88i275kw.dlg@borkborkbork.bork> User-Agent: 40tude_Dialog/2.0.5.1 NNTP-Posting-Host: 80.1.205.234 X-Trace: newsgroups.borland.com 1081600029 80.1.205.234 (10 Apr 2004 05:27:09 -0800) Lines: 28 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail