Package de.measite.minidns
Enum DNSMessage.OPCODE
- java.lang.Object
-
- java.lang.Enum<DNSMessage.OPCODE>
-
- de.measite.minidns.DNSMessage.OPCODE
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<DNSMessage.OPCODE>
- Enclosing class:
- DNSMessage
public static enum DNSMessage.OPCODE extends java.lang.Enum<DNSMessage.OPCODE>
Symbolic DNS Opcode values.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INVERSE_QUERYNOTIFYQUERYSTATUSUPDATE
-
Field Summary
Fields Modifier and Type Field Description private static DNSMessage.OPCODE[]INVERSE_LUTLookup table for for obcode reolution.private bytevalueThe value of this opcode.
-
Constructor Summary
Constructors Modifier Constructor Description privateOPCODE(int value)Create a new opcode for a given byte value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DNSMessage.OPCODEgetOpcode(int value)Retrieve the symbolic name of an opcode byte.bytegetValue()Retrieve the byte value of this opcode.static DNSMessage.OPCODEvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static DNSMessage.OPCODE[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
QUERY
public static final DNSMessage.OPCODE QUERY
-
INVERSE_QUERY
public static final DNSMessage.OPCODE INVERSE_QUERY
-
STATUS
public static final DNSMessage.OPCODE STATUS
-
NOTIFY
public static final DNSMessage.OPCODE NOTIFY
-
UPDATE
public static final DNSMessage.OPCODE UPDATE
-
-
Field Detail
-
INVERSE_LUT
private static final DNSMessage.OPCODE[] INVERSE_LUT
Lookup table for for obcode reolution.
-
value
private final byte value
The value of this opcode.
-
-
Method Detail
-
values
public static DNSMessage.OPCODE[] 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.OPCODE c : DNSMessage.OPCODE.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.OPCODE 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 namejava.lang.NullPointerException- if the argument is null
-
getValue
public byte getValue()
Retrieve the byte value of this opcode.- Returns:
- The byte value of this opcode.
-
getOpcode
public static DNSMessage.OPCODE getOpcode(int value)
Retrieve the symbolic name of an opcode byte.- Parameters:
value- The byte value of the opcode.- Returns:
- The symbolic opcode or null.
- Throws:
java.lang.IllegalArgumentException- If the byte value is not in the range 0..15.
-
-