unable to delete the file used to construct a FileDataSource Object...
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Elcholas_Yeo
Posted On:   Monday, December 17, 2001 03:41 AM

I have constructed a MimeMultipart object from a FileDataSource object. The FileDataSource object was in turn constructed from a text file which contain the smtp data content in encoded form. The MimeMultipart object is able to parse and decode the various part contain within the file. However, I am not able to delete the text file after the file was parsed even though I have made sure that all input and output stream are all close after use. The method used to delete the file is FileDataSource.getFile().delete(). I have suspected that it was due to SharedInputStream used by the MimeMultipart class, which is holding up the resource to prevent it from being deleted. Can someone please point me in the right direction to    More>>


I have constructed a MimeMultipart object from a FileDataSource object. The FileDataSource object was in turn constructed from a text file which contain the smtp data content in encoded form.


The MimeMultipart object is able to parse and decode the various part contain within the file. However, I am not able to delete the text file after the file was parsed even though I have made sure that all input and output stream are all close after use. The method used to delete the file is FileDataSource.getFile().delete().


I have suspected that it was due to SharedInputStream used by the MimeMultipart class, which is holding up the resource to prevent it from being deleted. Can someone please point me in the right direction to workaround this issue.

   <<Less

Re: unable to delete the file used to construct a FileDataSource Object...

Posted By:   John_Zukowski  
Posted On:   Thursday, December 20, 2001 08:28 PM

Try posting this question to the JavaMail mailing list and the API designer should be able to answer.
About | Sitemap | Contact