You will have to first know what encoding the input data uses. Then you can using an InputStreamReader set to use that encoding, and an OutputStreamWriter set to use UTF-8. That should make the translation for you. If both input and output are in UTF-8, and you don't need to work with the data in your
Java code, then you can skip both reader and the writer and just copy the bytes from input to output.