I'm no pro, so I'd be interested to hear what others do as well.
1) For binary files that have text in them, I just write the size of the string and then the string itself - I don't do anything special to it.
2) I keep text-only data as plaintext files, for convenience of editing with tools like notepad, unless I have a reason why binary would be better.
Even things like std::maps or std::vectors I sometimes just load from comma-separated or newline-seperated text files for easier editing. Classes or structs I usually save to binary files or else plain-text config files with special syntax.
[Edit:] Oh, you were referring to Java specifically - my bad. My response comes from using C++.
Edited by Servant of the Lord, 07 June 2013 - 02:19 PM.