org.klomp.snark

## Class Request

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

-      class Request
      extends Object

  Holds all information needed for a partial piece request. This class should be used only by PeerState, PeerConnectionIn, and PeerConnectionOut.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) byte[]` | `bs`
    `(package private) int` | `len`
    `(package private) int` | `off`
    `(package private) int` | `piece`
    `(package private) long` | `sendTime`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Request(int piece, byte[] bs, int off, int len)` Creates a new Request.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### piece

          final int piece

    - #### bs

          final byte[] bs

    - #### off

          final int off

    - #### len

          final int len

    - #### sendTime

          long sendTime

  - ### Constructor Detail

    - #### Request

          Request(int piece,
                 byte[] bs,
                 int off,
                 int len)

      Creates a new Request.
      Parameters:
        `piece` - Piece number requested.
        `bs` - byte array where response should be stored.
        `off` - the offset in the array.
        `len` - the number of bytes requested.

  - ### Method Detail

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`