System.out.println("Hashing the files...");
System.out.flush();
tp.generatePieceHashes();
System.out.println("Hash complete... Saving...");
TorrentFile torrentFile = new TorrentFile(tp.generateTorrent(item.getFileUrl()));
torrent.setCreatedDate(new Date());
torrent.setFile(torrentFile);
OutputStream fos = new FileOutputStream("/tmp/file-989.mp3.torrent");
fos.write(torrentFile.getData());
// Save the new data (TorrentFile & Torrent).
// podcastDao.storeTorrent(torrent);
item.setTorrent(torrent);