Package org.johnnei.javatorrent.torrent
Class Metadata
- java.lang.Object
-
- org.johnnei.javatorrent.torrent.Metadata
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetadata.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)List<FileEntry>getFileEntries()Optional<AbstractFileSet>getFileSet()byte[]getHash()Gets the 20 byte BTIH hash of the torrent.StringgetHashString()Gets thegetHash()formatted as hexadecimal.StringgetName()List<byte[]>getPieceHashes()longgetPieceSize()inthashCode()voidinitializeMetadata(byte[] buffer)voidsetFileSet(AbstractFileSet fileSet)
-
-
-
Method Detail
-
setFileSet
public void setFileSet(AbstractFileSet fileSet)
-
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 thegetHash()formatted as hexadecimal.- Returns:
- The BTIH hash in hexadecimal.
- See Also:
getHash()
-
getFileSet
public Optional<AbstractFileSet> getFileSet()
-
-