org.minidns.edns

## Class Edns.Builder

- java.lang.Object
- - org.minidns.edns.Edns.Builder

- Enclosing class:
    Edns

      public static final class Edns.Builder
      extends Object

  Builder for creating EDNS instances.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Edns.Builder` | `addEdnsOption(EdnsOption ednsOption)` Adds an EDNS option.
    `Edns` | `build()` Builds the EDNS instance.
    `Edns.Builder` | `setDnssecOk()` Sets the DNSSEC OK flag to true.
    `Edns.Builder` | `setDnssecOk(boolean dnssecOk)` Sets the DNSSEC OK flag.
    `Edns.Builder` | `setUdpPayloadSize(int udpPayloadSize)` Sets the UDP payload size.

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

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

- - ### Method Detail

    - #### addEdnsOption

          public Edns.Builder addEdnsOption(EdnsOption ednsOption)

      Adds an EDNS option.
      Parameters:
        `ednsOption` - the EDNS option to add
      Returns:
        this builder

    - #### build

          public Edns build()

      Builds the EDNS instance.
      Returns:
        the constructed EDNS instance

    - #### setDnssecOk

          public Edns.Builder setDnssecOk()

      Sets the DNSSEC OK flag to true.
      Returns:
        this builder

    - #### setDnssecOk

          public Edns.Builder setDnssecOk(boolean dnssecOk)

      Sets the DNSSEC OK flag.
      Parameters:
        `dnssecOk` - whether DNSSEC OK flag should be set
      Returns:
        this builder

    - #### setUdpPayloadSize

          public Edns.Builder setUdpPayloadSize(int udpPayloadSize)

      Sets the UDP payload size.
      Parameters:
        `udpPayloadSize` - the UDP payload size
      Returns:
        this builder
      Throws:
        `IllegalArgumentException` - if the payload size is greater than 65536