public TorrentHandle addTorrent(File outputParent, File torrentFile) { TorrentHandle torrent = session.addTorrent(torrentFile, outputParent); log.info("added torrent: " + torrent.getName() + " , path: " + torrentFile.getAbsolutePath()); shareTorrent(torrent); infoHashToTorrentMap.put(torrent.getInfoHash().toString().toLowerCase(), torrent); return torrent; }