net.i2p.router.transport.udp

## Class PacketBuilder

- java.lang.Object
- - net.i2p.router.transport.udp.PacketBuilder

-     class PacketBuilder
      extends Object

  Builder for UDP packets.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PacketBuilder.Fragment` Class for passing multiple fragments to buildPacket()

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ABSOLUTE_MAX_ACKS` one byte field
    `static int` | `DATA_HEADER_SIZE` not including acks.
    `static int` | `FRAGMENT_HEADER_SIZE` 4 byte msg ID + 3 byte fragment info
    `static int` | `HEADER_SIZE` if no extended options or rekey data, which we don't support = 37
    `static int` | `IP_HEADER_SIZE` IPv4 only
    `static int` | `IPV6_HEADER_SIZE`
    `static int` | `MIN_DATA_PACKET_OVERHEAD` 74
    `static int` | `MIN_IPV6_DATA_PACKET_OVERHEAD` 94
    `(package private) static int` | `PRIORITY_HIGH`
    `static int` | `UDP_HEADER_SIZE` Same for IPv4 and IPv6

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PacketBuilder()`

  - ### Method Summary

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

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

- - ### Field Detail

    - #### ABSOLUTE_MAX_ACKS

          public static final int ABSOLUTE_MAX_ACKS

      one byte field
      See Also:
        Constant Field Values

    - #### DATA_HEADER_SIZE

          public static final int DATA_HEADER_SIZE

      not including acks. 46
      See Also:
        Constant Field Values

    - #### FRAGMENT_HEADER_SIZE

          public static final int FRAGMENT_HEADER_SIZE

      4 byte msg ID + 3 byte fragment info
      See Also:
        Constant Field Values

    - #### HEADER_SIZE

          public static final int HEADER_SIZE

      if no extended options or rekey data, which we don't support = 37
      See Also:
        Constant Field Values

    - #### IP_HEADER_SIZE

          public static final int IP_HEADER_SIZE

      IPv4 only
      See Also:
        Constant Field Values

    - #### IPV6_HEADER_SIZE

          public static final int IPV6_HEADER_SIZE

      See Also:
        Constant Field Values

    - #### MIN_DATA_PACKET_OVERHEAD

          public static final int MIN_DATA_PACKET_OVERHEAD

      74
      See Also:
        Constant Field Values

    - #### MIN_IPV6_DATA_PACKET_OVERHEAD

          public static final int MIN_IPV6_DATA_PACKET_OVERHEAD

      94
      See Also:
        Constant Field Values

    - #### PRIORITY_HIGH

          static final int PRIORITY_HIGH

      See Also:
        Constant Field Values

    - #### UDP_HEADER_SIZE

          public static final int UDP_HEADER_SIZE

      Same for IPv4 and IPv6
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PacketBuilder

          PacketBuilder()