Enum DNSMessage.RESPONSE_CODE

    • Field Detail

      • value

        private final byte value
        The response code value.
    • Constructor Detail

      • RESPONSE_CODE

        private RESPONSE_CODE​(int value)
        Create a new response code.
        Parameters:
        value - The response code value.
    • Method Detail

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

        public static DNSMessage.RESPONSE_CODE valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getValue

        public byte getValue()
        Retrieve the byte value of the response code.
        Returns:
        the response code.
      • getResponseCode

        public static DNSMessage.RESPONSE_CODE getResponseCode​(int value)
        Retrieve the response code for a byte value.
        Parameters:
        value - The byte value.
        Returns:
        The symbolic response code or null.
        Throws:
        java.lang.IllegalArgumentException - if the value is not in the range of 0..15.