8

Binary file read in as string and stored as Base64

view full story
linux-howto

http://stackoverflow.com – I have an issue with a legacy program. The program reads a file from disk as string and encodes the file as Base64 and saves the file to disk. The problem is that the file read in is a binary file. Is there any way to reverse this process? Here is the offending line of code: String sig = android.util.Base64.encodeToString( utility.readFileAsString(file.getPath()).getBytes(), android.util.Base64.DEFAULT); We have update the application to read the file in as bytes but that doesn't help with the files already created. Any help would be greatly appreciated... (HowTos)