org.apache.directory.server.dhcp.options
Class ByteOption

java.lang.Object
  extended by org.apache.directory.server.dhcp.options.DhcpOption
      extended by org.apache.directory.server.dhcp.options.ByteOption
Direct Known Subclasses:
AllSubnetsAreLocal, DefaultIpTimeToLive, EthernetEncapsulation, IpForwarding, MaskSupplier, NetbiosNodeType, NonLocalSourceRouting, OptionOverload, PerformMaskDiscovery, TcpDefaultTimeToLive, TcpKeepaliveInterval, TrailerEncapsulation

public abstract class ByteOption
extends DhcpOption

The Dynamic Host Configuration Protocol (DHCP) provides a framework for passing configuration information to hosts on a TCP/IP network. Configuration parameters and other control information are carried in tagged data items that are stored in the 'options' field of the DHCP message. The data items themselves are also called "options." This abstract base class is for options that carry an unsigned short value (16 bit).

Version:
$Rev: 551805 $, $Date: 2007-06-29 00:57:04 -0500 (Fr, 29 Jun 2007) $
Author:
Apache Directory Project

Constructor Summary
ByteOption()
           
 
Method Summary
 short getByteValue()
           
 byte[] getData()
          Get the data (wire format) into a byte array.
 void setData(byte[] data)
          Set the data (wire format) from a byte array.
 void setShortValue(short shortValue)
           
 
Methods inherited from class org.apache.directory.server.dhcp.options.DhcpOption
getClassByTag, getTag, getTagByClass, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteOption

public ByteOption()
Method Detail

setData

public void setData(byte[] data)
Description copied from class: DhcpOption
Set the data (wire format) from a byte array. The default implementation just records the data as a byte array. Subclasses may parse the data into something more meaningful.

Overrides:
setData in class DhcpOption

getData

public byte[] getData()
Description copied from class: DhcpOption
Get the data (wire format) into a byte array. Subclasses must provide an implementation which serializes the parsed data back into a byte array if they override DhcpOption.setData(byte[]).

Overrides:
getData in class DhcpOption
Returns:
byte[]

getByteValue

public short getByteValue()

setShortValue

public void setShortValue(short shortValue)


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.