Java - Base64 string in and out of a text
base64, encoding, java
Solution
Base64 is only A–Z, a–z, 0–9, + and /. So there should be no encoding problem. As long as you're able to encode Ascii properly. Base64 was invented to represent bytes in 7-bit characters.
To encode and decode you can use commons codec Base64.
Problem
I need to write string containing base64 encoded text to a text file and then later read that string back from the text file to a string variable. How can i do it so that there is no data loss due to encoding issues?