public abstract class DhcpOption
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.Class<?>,java.lang.Integer> |
CODE_BY_CLASS
A map of tag codes indexed by OptionClass subclass.
|
private byte[] |
data
The default data array used for simple (unparsed) options.
|
private static java.util.Map<java.lang.Integer,java.lang.Class<?>> |
OPTION_CLASS_BY_CODE
A map of concrete implementations of DhcpOption indexed by tag code.
|
private static java.lang.Class<?>[] |
OPTION_CLASSES
An array of concrete implementations of DhcpOption.
|
| Constructor and Description |
|---|
DhcpOption() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class<?> |
getClassByTag(int tag) |
byte[] |
getData()
Get the data (wire format) into a byte array.
|
abstract byte |
getTag()
Get the option's code tag.
|
static int |
getTagByClass(java.lang.Class<?> c) |
void |
setData(byte[] data)
Set the data (wire format) from a byte array.
|
void |
writeTo(java.nio.ByteBuffer out) |
private static final java.lang.Class<?>[] OPTION_CLASSES
private static final java.util.Map<java.lang.Integer,java.lang.Class<?>> OPTION_CLASS_BY_CODE
private static final java.util.Map<java.lang.Class<?>,java.lang.Integer> CODE_BY_CLASS
private byte[] data
public static java.lang.Class<?> getClassByTag(int tag)
public static int getTagByClass(java.lang.Class<?> c)
public abstract byte getTag()
public void setData(byte[] data)
data - public byte[] getData()
setData(byte[]).public final void writeTo(java.nio.ByteBuffer out)