torrent files contain bytes that aren’t valid UTF-16 characters. You’ll run into problems if you try to read the contents of this file as a String . Use byte[] instead.
My decoder accepts a string and parses it. Is there a way to keep using it with the bytes array?