Exemple #1
0
 @Override
 public File getFile() {
   if (_torrent.isComplete()) {
     return _torrent.getMetaInfo().getFileSystem().getCompleteFile();
   } else {
     return _torrent.getMetaInfo().getFileSystem().getIncompleteFile();
   }
 }
Exemple #2
0
 @Override
 public URN getUrn() {
   return _torrent.getMetaInfo().getURN();
 }
  /**
   * Get the torrent's info hash as a text URN, like "urn:sha1:JAZSGOLT6UP4I5N5KGJRZPSF6RZCEJKQ".
   * The info hash is the SHA1 hash of the "info" section of the bencoded data of the .torrent file.
   *
   * @return A String like "urn:sha1:JAZSGOLT6UP4I5N5KGJRZPSF6RZCEJKQ"
   */
  public URN getSHA1Urn() {

    // Get it from the BTMetaInfo object
    return _torrent.getMetaInfo().getURN();
  }