scala - Parsing a torrent file -


I am trying to read in the .torrent file with the following code:

  Val source = scala.io.Source.fromFile (filename, "utf-8") val lines = source.mkString source.close ()  

But when I run my program, Exception:

  Exception in thread "main" java.nio.charset.MalformedInputException: Input Length = 1  

I try to insert and get a charset Have the same problem.

What is the problem and what should be the file to read?

The torrent file is no plain text , rather it is because of them

to decode

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -