java - Deleting a File using J2ME throws an IOException -


I am trying to use a file called JCM fileConnection.delete () method, but every time IOException is throwing I delete the call () method I have written a conditional statement to verify the existence of the file, but there is no undiscovered by the fact that an IOException is thrown. According to

, when the delete () is called on a file connection object, then all the currents objects are closed, and IOException is thrown out, if the streams related to a particular file Any further action takes place.

The file I am trying to delete has been entered in the same program, but call the Delete () method, I call callControl.reset (). Will this possibly be the reason for throwing IOException?

What could be my problem?

I believe that any of your code is connected to the file you want to delete. You should manually close all connections in the existing file and do not believe that someone else will do this for you.

Have you opened the file in other applications like Notepad?


Comments