title: Java .torrent file download
body: <p>I want to download a .torrent file from this link 
  <a href="http://torrage.com/torrent/13764753227BCBE3E8E82C058A7D5CE2BDDF9857.torrent" rel="nofollow">http://torrage.com/torrent/13764753227BCBE3E8E82C058A7D5CE2BDDF9857.torrent</a>
  to do this I use this code</p>
  
  <pre><code>URL website = new URL(link);
  ReadableByteChannel rbc = Channels.newChannel(website.openStream());
  File f = new File(path+"t2.torrent");
  FileOutputStream fos = new FileOutputStream(f);
  fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
  fos.close();
  </code></pre>
  
  <p>Now, when I open it in utorrent i get this message : Unable to load "t2.torrent": torrent is not a valid bencoding!</p>
  
  <p>From what I read on internet I learnd that this files have a special encoding.
  What is the propper way to download end encode this kind of file.
  Thanks!</p>