org.klomp.snark

## Class TrackerInfo

- java.lang.Object
- - org.klomp.snark.TrackerInfo

-     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

    Constructors
    Constructor and Description
    `TrackerInfo(InputStream in, byte[] my_id, byte[] infohash, MetaInfo metainfo, I2PSnarkUtil util)`
    `TrackerInfo(Set<Hash> hashes, int interval, int complete, int incomplete, String error, byte[] my_id, byte[] infohash, MetaInfo metainfo, I2PSnarkUtil util)` To convert returned UDPTracker data to the standard structure

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getFailureReason()` Not HTML escaped.
    `int` | `getInterval()` in seconds
    `int` | `getPeerCount()`
    `Set<Peer>` | `getPeers()`
    `int` | `getSeedCount()`
    `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,
                             byte[] infohash,
                             MetaInfo metainfo,
                             I2PSnarkUtil util)
                      throws IOException

      Parameters:
        `metainfo` - may be null
      Throws:
        `IOException`

    - #### TrackerInfo

          public TrackerInfo(Set<Hash> hashes,
                             int interval,
                             int complete,
                             int incomplete,
                             String error,
                             byte[] my_id,
                             byte[] infohash,
                             MetaInfo metainfo,
                             I2PSnarkUtil util)

      To convert returned UDPTracker data to the standard structure
      Parameters:
        `hashes` - may be null
        `error` - may be null

  - ### Method Detail

    - #### getFailureReason

          public String getFailureReason()

      Not HTML escaped.

    - #### getInterval

          public int getInterval()

      in seconds

    - #### getPeerCount

          public int getPeerCount()

    - #### getPeers

          public Set<Peer> getPeers()

    - #### getSeedCount

          public int getSeedCount()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`