EDNSOption.Code (dnsjava documentation)
Date: 2013-04-10

org.xbill.DNS

## Class EDNSOption.Code

- java.lang.Object
- - org.xbill.DNS.EDNSOption.Code

- Enclosing class:
    EDNSOption

      public static class EDNSOption.Code
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CLIENT_SUBNET` Client Subnet, defined in draft-vandergaast-edns-client-subnet-00
    `static int` | `NSID` Name Server Identifier, RFC 5001

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `string(int code)` Converts an EDNS Option Code into its textual representation
    `static int` | `value(String s)` Converts a textual representation of an EDNS Option Code into its numeric value.

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

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

- - ### Field Detail

    - #### NSID

          public static final int NSID

      Name Server Identifier, RFC 5001
      See Also:
        Constant Field Values

    - #### CLIENT_SUBNET

          public static final int CLIENT_SUBNET

      Client Subnet, defined in draft-vandergaast-edns-client-subnet-00
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### string

          public static String string(int code)

      Converts an EDNS Option Code into its textual representation

    - #### value

          public static int value(String s)

      Converts a textual representation of an EDNS Option Code into its numeric value.
      Parameters:
        `s` - The textual representation of the option code
      Returns:
        The option code, or -1 on error.