java.lang.Object
net.i2p.router.transport.udp.SSU2Payload.Block
net.i2p.router.transport.udp.SSU2Payload.FirstFragBlock
Enclosing class:
SSU2Payload

public static class SSU2Payload.FirstFragBlockextends SSU2Payload.Block
Same format as I2NPBlock.
  • Field Details

  • Constructor Details

    • FirstFragBlock

      public FirstFragBlock(OutboundMessageState msg)
      Create a first fragment block.
      Parameters:
      msg - the outbound message state
  • Method Details

    • setMessage

      void setMessage(OutboundMessageState msg)
      Repurpose this block for a new message. Only for pooling.
      Parameters:
      msg - the outbound message state
    • getDataLength

      public int getDataLength()
      Return the fragment size including the 9 byte header.
      Specified by:
      getDataLength in class SSU2Payload.Block
      Returns:
      the fragment data length
    • writeData

      public int writeData(byte[] tgt, int off)
      Write the first fragment block data to the target array.
      Specified by:
      writeData in class SSU2Payload.Block
      Parameters:
      tgt - target array to write to
      off - offset in the target array
      Returns:
      the new offset after writing