Package 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
    Description
    static final int
    Matches any class
    static final int
    Chaos network (MIT)
    static final int
    Chaos network (MIT, alternate name)
    static final int
    Hesiod name server (MIT, alternate name)
    static final int
    Hesiod name server (MIT)
    static final int
    Internet
    static final int
    Special value used in dynamic update messages
  • Method Summary

    Modifier and Type
    Method
    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
    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 Details

  • Method Details

    • 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.