DClass (dnsjava documentation)
Date: 2013-04-10

org.xbill.DNS

## Class DClass

- java.lang.Object
- - org.xbill.DNS.DClass

-     public final class DClass
      extends Object

  Constants and functions relating to DNS classes. This is called DClass to avoid confusion with Class.
  Author:
    Brian Wellington

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ANY` Matches any class
    `static int` | `CH` Chaos network (MIT)
    `static int` | `CHAOS` Chaos network (MIT, alternate name)
    `static int` | `HESIOD` Hesiod name server (MIT, alternate name)
    `static int` | `HS` Hesiod name server (MIT)
    `static int` | `IN` Internet
    `static int` | `NONE` Special value used in dynamic update messages

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `check(int i)` Checks that a numeric DClass is valid.
    `static String` | `string(int i)` Converts a numeric DClass into a String
    `static int` | `value(String s)` Converts a String representation of a DClass into its numeric value

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

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

- - ### Field Detail

    - #### IN

          public static final int IN

      Internet
      See Also:
        Constant Field Values

    - #### CH

          public static final int CH

      Chaos network (MIT)
      See Also:
        Constant Field Values

    - #### CHAOS

          public static final int CHAOS

      Chaos network (MIT, alternate name)
      See Also:
        Constant Field Values

    - #### HS

          public static final int HS

      Hesiod name server (MIT)
      See Also:
        Constant Field Values

    - #### HESIOD

          public static final int HESIOD

      Hesiod name server (MIT, alternate name)
      See Also:
        Constant Field Values

    - #### NONE

          public static final int NONE

      Special value used in dynamic update messages
      See Also:
        Constant Field Values

    - #### ANY

          public static final int ANY

      Matches any class
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### check

          public static void check(int i)

      Checks that a numeric DClass is valid.
      Throws:
        `InvalidDClassException` - The class is out of range.

    - #### string

          public static String string(int i)

      Converts a numeric DClass into a String
      Returns:
        The canonical string representation of the class
      Throws:
        `InvalidDClassException` - The class is out of range.

    - #### value

          public static int value(String s)

      Converts a String representation of a DClass into its numeric value
      Returns:
        The class code, or -1 on error.