jist.swans.route
Class RouteDsrMsg.OptionPadN

java.lang.Object
  extended by jist.swans.route.RouteDsrMsg.Option
      extended by jist.swans.route.RouteDsrMsg.OptionPadN
Enclosing class:
RouteDsrMsg

public static class RouteDsrMsg.OptionPadN
extends RouteDsrMsg.Option

A PadN option. This represents N bytes of padding in the DSR header.


Field Summary
 
Fields inherited from class jist.swans.route.RouteDsrMsg.Option
optBuf, optBufOffset
 
Constructor Summary
RouteDsrMsg.OptionPadN(byte[] buf, int offset)
          
 
Method Summary
static byte[] create(byte len)
          Creates a new PadN option.
 int getSize()
          Returns the size in bytes of this option.
 byte getType()
          Returns the DSR type code for this kind of option.
 
Methods inherited from class jist.swans.route.RouteDsrMsg.Option
create, equals, getBytes, getType, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RouteDsrMsg.OptionPadN

public RouteDsrMsg.OptionPadN(byte[] buf,
                              int offset)

Method Detail

getType

public byte getType()
Returns the DSR type code for this kind of option.

Specified by:
getType in class RouteDsrMsg.Option
Returns:
the DSR type code for this kind of option.

getSize

public int getSize()
Returns the size in bytes of this option.

Specified by:
getSize in class RouteDsrMsg.Option
Returns:
the size in bytes of this option.

create

public static byte[] create(byte len)
Creates a new PadN option.

Parameters:
len - the length of the option in bytes, not including the Option Type or Option Data Length fields
Returns:
a byte array corresponding to the desired option.