org.klomp.snark
Class TrackerInfo

java.lang.Object
  extended by 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


Constructor Summary
TrackerInfo(BDecoder be, byte[] my_id, MetaInfo metainfo)
           
TrackerInfo(InputStream in, byte[] my_id, MetaInfo metainfo)
           
TrackerInfo(Map m, byte[] my_id, MetaInfo metainfo)
           
 
Method Summary
 String getFailureReason()
           
 int getInterval()
           
 int getPeerCount()
           
 Set<Peer> getPeers()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TrackerInfo

public TrackerInfo(InputStream in,
                   byte[] my_id,
                   MetaInfo metainfo)
            throws IOException
Throws:
IOException

TrackerInfo

public TrackerInfo(BDecoder be,
                   byte[] my_id,
                   MetaInfo metainfo)
            throws IOException
Throws:
IOException

TrackerInfo

public TrackerInfo(Map m,
                   byte[] my_id,
                   MetaInfo metainfo)
            throws IOException
Throws:
IOException
Method Detail

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