Package org.minidns.dnsmessage
Enum DnsMessage.RESPONSE_CODE
- All Implemented Interfaces:
Serializable
,Comparable<DnsMessage.RESPONSE_CODE>
,java.lang.constant.Constable
- Enclosing class:
- DnsMessage
public static enum DnsMessage.RESPONSE_CODE extends Enum<DnsMessage.RESPONSE_CODE>
Possible DNS response codes.
-
Nested Class Summary
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description static DnsMessage.RESPONSE_CODE
getResponseCode(int value)
Retrieve the response code for a byte value.byte
getValue()
Retrieve the byte value of the response code.static DnsMessage.RESPONSE_CODE
valueOf(String name)
Returns the enum constant of this type with the specified name.static DnsMessage.RESPONSE_CODE[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public byte getValue()Retrieve the byte value of the response code.- Returns:
- the response code.
-
getResponseCode
Retrieve the response code for a byte value.- Parameters:
value
- The byte value.- Returns:
- The symbolic response code or null.
- Throws:
IllegalArgumentException
- if the value is not in the range of 0..15.
-