try {
TorrentManager torrentManager = pluginInterface.getTorrentManager();
try {
Torrent new_torrent = torrentManager.createFromBEncodedInputStream(data);
DownloadManager dm = pluginInterface.getDownloadManager();
dm.addDownload(new_torrent);
} catch (TorrentException e1) {
e1.printStackTrace();
} catch (DownloadException e2) {
e2.printStackTrace();