Package org.minidns.dnsmessage
Enum DnsMessage.RESPONSE_CODE
- java.lang.Object
-
- java.lang.Enum<DnsMessage.RESPONSE_CODE>
-
- org.minidns.dnsmessage.DnsMessage.RESPONSE_CODE
-
- All Implemented Interfaces:
Serializable
,Comparable<DnsMessage.RESPONSE_CODE>
- Enclosing class:
- DnsMessage
public static enum DnsMessage.RESPONSE_CODE extends Enum<DnsMessage.RESPONSE_CODE>
Possible DNS response codes.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
NO_ERROR
public static final DnsMessage.RESPONSE_CODE NO_ERROR
-
FORMAT_ERR
public static final DnsMessage.RESPONSE_CODE FORMAT_ERR
-
SERVER_FAIL
public static final DnsMessage.RESPONSE_CODE SERVER_FAIL
-
NX_DOMAIN
public static final DnsMessage.RESPONSE_CODE NX_DOMAIN
-
NO_IMP
public static final DnsMessage.RESPONSE_CODE NO_IMP
-
REFUSED
public static final DnsMessage.RESPONSE_CODE REFUSED
-
YXDOMAIN
public static final DnsMessage.RESPONSE_CODE YXDOMAIN
-
YXRRSET
public static final DnsMessage.RESPONSE_CODE YXRRSET
-
NXRRSET
public static final DnsMessage.RESPONSE_CODE NXRRSET
-
NOT_AUTH
public static final DnsMessage.RESPONSE_CODE NOT_AUTH
-
NOT_ZONE
public static final DnsMessage.RESPONSE_CODE NOT_ZONE
-
BADVERS_BADSIG
public static final DnsMessage.RESPONSE_CODE BADVERS_BADSIG
-
BADKEY
public static final DnsMessage.RESPONSE_CODE BADKEY
-
BADTIME
public static final DnsMessage.RESPONSE_CODE BADTIME
-
BADMODE
public static final DnsMessage.RESPONSE_CODE BADMODE
-
BADNAME
public static final DnsMessage.RESPONSE_CODE BADNAME
-
BADALG
public static final DnsMessage.RESPONSE_CODE BADALG
-
BADTRUNC
public static final DnsMessage.RESPONSE_CODE BADTRUNC
-
BADCOOKIE
public static final DnsMessage.RESPONSE_CODE BADCOOKIE
-
-
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(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:
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
public static DnsMessage.RESPONSE_CODE getResponseCode(int value) throws IllegalArgumentException
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.
-
-