## Uses of Class
org.klomp.snark.PartialPiece

- Packages that use PartialPiece
  Package | Description
  --- | ---
  org.klomp.snark | I2P version of the snark bittorrent client, imported in 2005 and heavily enhanced to add a web UI, DHT support, and other features.

- - ### Uses of PartialPiece in org.klomp.snark

    Methods in org.klomp.snark that return PartialPiece
    Modifier and Type | Method and Description
    --- | ---
    `PartialPiece` | Request.`getPartialPiece()` The PartialPiece this Request is for
    `PartialPiece` | PeerListener.`getPartialPiece(Peer peer, BitField havePieces)` Called when a peer has connected and there may be a partially downloaded piece that the coordinatorator can give the peer task
    `PartialPiece` | PeerCoordinator.`getPartialPiece(Peer peer, BitField havePieces)` Return partial piece to the PeerState if it's still wanted and peer has it.

    Methods in org.klomp.snark with parameters of type PartialPiece
    Modifier and Type | Method and Description
    --- | ---
    `(package private) boolean` | MetaInfo.`checkPiece(PartialPiece pp)`
    `int` | PartialPiece.`compareTo(PartialPiece other)` Compares this piece with another by piece number, highest priority first, then by highest downloaded first.
    `boolean` | PeerListener.`gotPiece(Peer peer, PartialPiece piece)` Called when a piece is received from the peer.
    `boolean` | PeerCoordinator.`gotPiece(Peer peer, PartialPiece pp)` Returns false if the piece is no good (according to the hash).
    `boolean` | Storage.`putPiece(PartialPiece pp)` Put the piece in the Storage if it is correct.

    Constructors in org.klomp.snark with parameters of type PartialPiece
    Constructor and Description
    `Request(PartialPiece piece, int off)` Dummy Request for PeerState.returnPartialPieces().
    `Request(PartialPiece piece, int off, int len)` Creates a new Request.