I am attempting to delete a file using J2ME's FileConnection.delete() method, but I an IOException is being thrown each time I call the delete() method. I have written a conditional statement to verify the existence of the file, but irregardless of that fact, an IOException is thrown.
According to the FileConnection API, when delete() is called on a FileConnection object, all streams associated with the object are closed, and an IOException is thrown if any subsequent actions on the streams associated with the particular file occur.
The file I am attempting to delete has been recorded within the same program, but after I call the delete() method, I call recordControl.reset(). Would this probably cause the IOException to be thrown?
What could be my problem?