code: public TorrentInfo torrentFile() {
          if (!th.is_valid()) {
              return null;
          }
          torrent_info ti = th.torrent_file_ptr();
          return ti != null ? new TorrentInfo(ti) : null;
      }
docs: Returns a pointer to the torrent_info object associated with this
  torrent. The {@link com.frostwire.jlibtorrent.TorrentInfo} object
  may be a copy of the internal object.
  <p>
  If the torrent doesn't have metadata, the pointer will not be
  initialized (i.e. a NULL pointer). The torrent may be in a state
  without metadata only if it was started without a .torrent file, e.g.
  by using the libtorrent extension of just supplying a tracker and
  info-hash.
  
  @return the internal torrent info