All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bt.metainfo.Torrent Maven / Gradle / Ivy

There is a newer version: 1.10
Show newest version
package bt.metainfo;

import bt.tracker.AnnounceKey;

import java.util.List;
import java.util.Optional;

/**
 * @since 1.0
 */
public interface Torrent {

    /**
     * @since 1.3
     */
    TorrentSource getSource();

    /**
     * @return Announce key, or {@link Optional#empty()} for trackerless torrents
     * @since 1.1
     */
    Optional getAnnounceKey();

    /**
     * @return Torrent ID.
     * @since 1.0
     */
    TorrentId getTorrentId();

    /**
     * @return Suggested name for this torrent.
     * @since 1.0
     */
    String getName();

    /**
     * @return Size of a chunk, in bytes.
     * @since 1.0
     */
    long getChunkSize();

    /**
     * @return Sequence of SHA-1 hashes of all chunks in this torrent.
     * @since 1.0
     */
    Iterable getChunkHashes();

    /**
     * @return Total size of all chunks in this torrent, in bytes.
     * @since 1.0
     */
    long getSize();

    /**
     * @return Information on the files contained in this torrent.
     * @since 1.0
     */
    List getFiles();

    /**
     * @return True if this torrent is private (see BEP-27)
     * @since 1.0
     */
    boolean isPrivate();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy