A FileIOException may occur on older devices when using DRM to encrypt files

When using ExtendedFileConnection.enableDRMForwardLock() you may encounter a FileIOException on older devices. I've gotten the following on two different 8300's (running 4.5.0.69 and 4.2.2.65) when trying to open an OutputStream:

[02/10 19:30:57.572-Thread-1642749952][FileUtility][WARN ] - FileIOException with code 510713856 for file file:///SDCard/myFile
net.rim.device.api.io.file.FileIOException. File system error

I've also received the following on a 4.2.2.89 simulator:

[56:54.113-1136][FileUtility][WARN ] - FileIOException with code 1050533888 for file file:///SDCard/myFile
net.rim.device.api.io.file.FileIOException. File system error

These problems did not occur when running the same code on two Bolds, and a few 4.6+ simulators.

Solution

This only occurred when using different ExtendedFileConnection objects to create the file and open an OutputStream to it. When I used the same ExtendedFileConnection to create the file, and create an OutputStream to it, I did not see this problem.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 12, 2010

    Mark McEver says:

    I've reported this to RIM: https://www.blackberry.com/jira/browse/JAVAAPI-854

© 2011 Metova, Inc.