This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Please give more detail regarding your problem, if my following guess is not the problem you are seeing.
I have successfully used Strings to contain binary data in a convenient (and Hash-able) form. I would not be able to use it in this manner if it was performing random substitutions. Perhaps you are using a FileReader/FileWriter when you should be using a FileInputStream/FileOutputStream? That would change the character data to UTF-Something or other.