While trying to write file to sdcard I get java.io.FileNotFoundException: /filename (Read-only file system) exception. Sadly none of the many solutions posted h
Try this:
File file = new File(Helpers.StripExtension(filePath) + ".blk");
file.createNewFile();
FileOutputStream fos = new FileOutputStream(file);
fos.write(digest.getBytes());
fos.close();
and if that doesn't work, I think you may have a problem when reading from the original file (digest.getBytes()). Post a little more code on this and we can go from there
Edit:
If it is not letting you write to the selected directory, try testing with a path like this:
File file = new File(Environment.getExternalStorageDirectory() + "test_file.blk");
It should work fine and you probably just don't have write permissions to the directory you are using.