|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.dhcp.DHCPOptions
public class DHCPOptions
This class represents a linked list of options for a DHCP message. Its purpose is to ease option handling such as add, remove, or change.
| Constructor Summary | |
|---|---|
DHCPOptions()
|
|
| Method Summary | |
|---|---|
boolean |
contains(byte entryCode)
|
byte[] |
externalize()
Converts a linked options list to a byte array |
byte[] |
getOption(byte entryCode)
Fetches value of option by its option code |
void |
internalize(byte[] optionsArray)
Converts an options byte array to a linked list |
boolean |
isEmpty()
Determines if list is empty |
void |
printList()
Prints the options linked list: For testing only. |
void |
removeOption(byte entryCode)
Removes option with specified bytecode |
void |
setOption(byte entryCode,
byte[] value)
Changes an existing option to new value |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DHCPOptions()
| Method Detail |
|---|
public void removeOption(byte entryCode)
entryCode - The code of option to be removedpublic boolean contains(byte entryCode)
public boolean isEmpty()
public byte[] getOption(byte entryCode)
entryCode - The node's option code
public void setOption(byte entryCode,
byte[] value)
entryCode - The node's option codevalue - Content of node optionpublic void internalize(byte[] optionsArray)
optionsArray - The byte array representation of the options listpublic byte[] externalize()
public void printList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||