org.minidns.dnsmessage

## Enum DnsMessage.RESPONSE_CODE

- java.lang.Object
- - java.lang.Enum<DnsMessage.RESPONSE_CODE>
  - - org.minidns.dnsmessage.DnsMessage.RESPONSE_CODE

- All Implemented Interfaces:
    Serializable, Comparable<DnsMessage.RESPONSE_CODE>
  Enclosing class:
    DnsMessage

      public static enum DnsMessage.RESPONSE_CODE
      extends Enum<DnsMessage.RESPONSE_CODE>

  Possible DNS response codes.
  See Also:
    IANA Domain Name System (DNS) Paramters - DNS RCODEs, RFC 6895 § 2.3

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BADALG`
    `BADCOOKIE`
    `BADKEY`
    `BADMODE`
    `BADNAME`
    `BADTIME`
    `BADTRUNC`
    `BADVERS_BADSIG`
    `FORMAT_ERR`
    `NO_ERROR`
    `NO_IMP`
    `NOT_AUTH`
    `NOT_ZONE`
    `NX_DOMAIN`
    `NXRRSET`
    `REFUSED`
    `SERVER_FAIL`
    `YXDOMAIN`
    `YXRRSET`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DnsMessage.RESPONSE_CODE` | `getResponseCode(int value)` Retrieve the response code for a byte value.
    `byte` | `getValue()` Retrieve the byte value of the response code.
    `static DnsMessage.RESPONSE_CODE` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static DnsMessage.RESPONSE_CODE[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### BADALG

          public static final DnsMessage.RESPONSE_CODE BADALG

    - #### BADCOOKIE

          public static final DnsMessage.RESPONSE_CODE BADCOOKIE

    - #### BADKEY

          public static final DnsMessage.RESPONSE_CODE BADKEY

    - #### BADMODE

          public static final DnsMessage.RESPONSE_CODE BADMODE

    - #### BADNAME

          public static final DnsMessage.RESPONSE_CODE BADNAME

    - #### BADTIME

          public static final DnsMessage.RESPONSE_CODE BADTIME

    - #### BADTRUNC

          public static final DnsMessage.RESPONSE_CODE BADTRUNC

    - #### BADVERS_BADSIG

          public static final DnsMessage.RESPONSE_CODE BADVERS_BADSIG

    - #### FORMAT_ERR

          public static final DnsMessage.RESPONSE_CODE FORMAT_ERR

    - #### NO_ERROR

          public static final DnsMessage.RESPONSE_CODE NO_ERROR

    - #### NO_IMP

          public static final DnsMessage.RESPONSE_CODE NO_IMP

    - #### NOT_AUTH

          public static final DnsMessage.RESPONSE_CODE NOT_AUTH

    - #### NOT_ZONE

          public static final DnsMessage.RESPONSE_CODE NOT_ZONE

    - #### NX_DOMAIN

          public static final DnsMessage.RESPONSE_CODE NX_DOMAIN

    - #### NXRRSET

          public static final DnsMessage.RESPONSE_CODE NXRRSET

    - #### REFUSED

          public static final DnsMessage.RESPONSE_CODE REFUSED

    - #### SERVER_FAIL

          public static final DnsMessage.RESPONSE_CODE SERVER_FAIL

    - #### YXDOMAIN

          public static final DnsMessage.RESPONSE_CODE YXDOMAIN

    - #### YXRRSET

          public static final DnsMessage.RESPONSE_CODE YXRRSET

  - ### Method Detail

    - #### getResponseCode

          public static DnsMessage.RESPONSE_CODE getResponseCode(int value)
                                                          throws IllegalArgumentException

      Retrieve the response code for a byte value.
      Parameters:
        `value` - The byte value.
      Returns:
        The symbolic response code or null.
      Throws:
        `IllegalArgumentException` - if the value is not in the range of 0..15.

    - #### getValue

          public byte getValue()

      Retrieve the byte value of the response code.
      Returns:
        the response code.

    - #### valueOf

          public static DnsMessage.RESPONSE_CODE valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### values

          public static DnsMessage.RESPONSE_CODE[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DnsMessage.RESPONSE_CODE c : DnsMessage.RESPONSE_CODE.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared