How can I make use of the parser I coded in previous rounds in #OW9

The task explicitly states

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?

@biljith Bytes → string is a lossy conversion, so it’s unlikely you’ll be able to re-use a parser that accepts strings.

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.