net.i2p.router.transport.udp

## Interface ACKBitfield

-     interface ACKBitfield

  Generic means of SACK/NACK transmission for partially or fully received messages

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `ackCount()` Number of fragments acked in this bitfield.
    `int` | `fragmentCount()` Get how many fragments are covered in this bitfield.
    `long` | `getMessageId()` Get the message ID this is partially ACKing.
    `int` | `highestReceived()` Highest fragment number acked in this bitfield.
    `boolean` | `received(int fragmentNum)` Check if the given fragment has been received.
    `boolean` | `receivedComplete()` Check if the entire message has been received completely.

- - ### Method Detail

    - #### ackCount

          int ackCount()

      Number of fragments acked in this bitfield. Faster than looping through received()
      Returns:
        number of fragments acked

    - #### fragmentCount

          int fragmentCount()

      Get how many fragments are covered in this bitfield.
      Returns:
        number of fragments

    - #### getMessageId

          long getMessageId()

      Get the message ID this is partially ACKing.
      Returns:
        message ID

    - #### highestReceived

          int highestReceived()

      Highest fragment number acked in this bitfield.
      Returns:
        highest fragment number acked, or -1 if none

    - #### received

          boolean received(int fragmentNum)

      Check if the given fragment has been received.
      Parameters:
        `fragmentNum` - fragment number to check
      Returns:
        true if fragment has been received

    - #### receivedComplete

          boolean receivedComplete()

      Check if the entire message has been received completely.
      Returns:
        true if message has been completely received