String.getBytes() is almost never OK, as it would depend on the locale's character set. Always pass the character set as argument to getBytes (and InputStreamReader/OutputStreamWriter, usually UTF8 is the best choice.
That said, I don't think that is the issue here..
