org.klomp.snark
Class TrackerInfo
java.lang.Object
org.klomp.snark.TrackerInfo
public class TrackerInfo
- extends Object
The data structure for the tracker response.
Handles both traditional and compact formats.
Compact format 1 - a list of hashes - early format for testing
Compact format 2 - One big string of concatenated hashes - official format
TrackerInfo
public TrackerInfo(InputStream in,
byte[] my_id,
byte[] infohash,
MetaInfo metainfo)
throws IOException
- Parameters:
metainfo
- may be null
- Throws:
IOException
getPeers
public Set<Peer> getPeers()
getPeerCount
public int getPeerCount()
getFailureReason
public String getFailureReason()
getInterval
public int getInterval()
toString
public String toString()
- Overrides:
toString
in class Object