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

org.xbill.DNS

## Class Flags

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

-     public final class Flags
      extends Object

  Constants and functions relating to flags in the DNS header.
  Author:
    Brian Wellington

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static byte` | `AA` authoritative answer
    `static byte` | `AD` authenticated data
    `static byte` | `CD` (security) checking disabled
    `static int` | `DO` dnssec ok (extended)
    `static byte` | `QR` query/response
    `static byte` | `RA` recursion available
    `static byte` | `RD` recursion desired
    `static byte` | `TC` truncated

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isFlag(int index)` Indicates if a bit in the flags field is a flag or not.
    `static String` | `string(int i)` Converts a numeric Flag into a String
    `static int` | `value(String s)` Converts a String representation of an Flag into its numeric value

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

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

- - ### Field Detail

    - #### QR

          public static final byte QR

      query/response
      See Also:
        Constant Field Values

    - #### AA

          public static final byte AA

      authoritative answer
      See Also:
        Constant Field Values

    - #### TC

          public static final byte TC

      truncated
      See Also:
        Constant Field Values

    - #### RD

          public static final byte RD

      recursion desired
      See Also:
        Constant Field Values

    - #### RA

          public static final byte RA

      recursion available
      See Also:
        Constant Field Values

    - #### AD

          public static final byte AD

      authenticated data
      See Also:
        Constant Field Values

    - #### CD

          public static final byte CD

      (security) checking disabled
      See Also:
        Constant Field Values

    - #### DO

          public static final int DO

      dnssec ok (extended)
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### string

          public static String string(int i)

      Converts a numeric Flag into a String

    - #### value

          public static int value(String s)

      Converts a String representation of an Flag into its numeric value

    - #### isFlag

          public static boolean isFlag(int index)

      Indicates if a bit in the flags field is a flag or not. If it's part of the rcode or opcode, it's not.