Code example for IOException

Methods: toString

0
                    MemoryFile memoryFile = new MemoryFile(null, 5000000);
                    memoryFile.writeBytes(TEST_BLOB, 0, 1000000, TEST_BLOB.length);
                    memoryFile.deactivate();
                    return AssetFileDescriptor.fromMemoryFile(memoryFile);
                } catch (IOException ex) {
                    throw new FileNotFoundException("Error reading " + url + ":" + ex.toString());
                } 
            case FILE:
                File file = getContext().getFileStreamPath(DATA_FILE);
                ParcelFileDescriptor fd =
                        ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
                return new AssetFileDescriptor(fd, 0, AssetFileDescriptor.UNKNOWN_LENGTH);
            default: 
                throw new FileNotFoundException("No files supported by provider at " + url);
        } 
    } 
 
    private AssetFileDescriptor getBlobColumnAsAssetFile(Uri url, String mode, String sql)
            throws FileNotFoundException { 
        if (!"r".equals(mode)) {
            throw new FileNotFoundException("Mode " + mode + " not supported for " + url);