Is there an easy way to avoid dealing with text encoding problems?
You can't avoid text encoding issues, but Apache commons-io has
Note these are the libraries referred to in Peter's answer of koders.com, just links to the library instead of source code.