Class Metadata


  • public class Metadata
    extends Object
    Represents the .torrent file of a Torrent
    • Method Detail

      • initializeMetadata

        public void initializeMetadata​(byte[] buffer)
      • getName

        public String getName()
      • getPieceHashes

        public List<byte[]> getPieceHashes()
      • getPieceSize

        public long getPieceSize()
      • getHash

        public byte[] getHash()
        Gets the 20 byte BTIH hash of the torrent.
        Returns:
        The 20 byte BTIH hash.
      • getHashString

        public String getHashString()
        Gets the getHash() formatted as hexadecimal.
        Returns:
        The BTIH hash in hexadecimal.
        See Also:
        getHash()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object