net.i2p.router.crypto.ratchet

## Class RatchetPayload.AckBlock

- java.lang.Object
- - net.i2p.router.crypto.ratchet.RatchetPayload.Block
  - - net.i2p.router.crypto.ratchet.RatchetPayload.AckBlock

- Enclosing class:
    RatchetPayload

      public static class RatchetPayload.AckBlock
      extends RatchetPayload.Block

  Acknowledgment block for ratchet payload.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AckBlock(int keyID, int n)`
    `AckBlock(List<Integer> acks)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getDataLength()`
    `int` | `writeData(byte[] tgt, int off)`

    - ### Methods inherited from class net.i2p.router.crypto.ratchet.RatchetPayload.Block

      `getTotalLength, toString, write`

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

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

- - ### Constructor Detail

    - #### AckBlock

          public AckBlock(int keyID,
                          int n)

    - #### AckBlock

          public AckBlock(List<Integer> acks)

      Parameters:
        `acks` - each is id << 16 | n

  - ### Method Detail

    - #### getDataLength

          public int getDataLength()

      Specified by:
        `getDataLength` in class `RatchetPayload.Block`
      Returns:
        the size of the block, NOT including the 3 byte header (type and size)

    - #### writeData

          public int writeData(byte[] tgt,
                               int off)

      Specified by:
        `writeData` in class `RatchetPayload.Block`
      Returns:
        new offset