| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjist.swans.route.RouteDsrMsg.Option
public abstract static class RouteDsrMsg.Option
The base class for all DSR header options.
| Field Summary | |
|---|---|
| protected  byte[] | optBufThe raw bytes of the option. | 
| protected  int | optBufOffsetThe offset into optbufwhere the option encoding begins. | 
| Constructor Summary | |
|---|---|
| RouteDsrMsg.Option(byte[] buf,
                   int offset)Creates a new option from the given byte array, starting at the given offset. | |
| Method Summary | |
|---|---|
| static RouteDsrMsg.Option | create(byte[] buf,
       int offset)Creates a new Optionfrom the given byte array, starting at
 the given offset. | 
|  boolean | equals(java.lang.Object o) | 
|  int | getBytes(byte[] buf,
         int offset)Retrieves the actual bytes of the option. | 
| abstract  int | getSize()Returns the size in bytes of this option. | 
| abstract  byte | getType()Returns the DSR type code for this kind of option. | 
| static byte | getType(byte[] buf)Returns the DSR type code for the given option. | 
|  int | hashCode() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected byte[] optBuf
protected int optBufOffset
optbuf where the option encoding begins.
| Constructor Detail | 
|---|
public RouteDsrMsg.Option(byte[] buf,
                          int offset)
buf - the buffer containing the optionoffset - the offset into buf where the option begins| Method Detail | 
|---|
public abstract byte getType()
public abstract int getSize()
public static byte getType(byte[] buf)
buf - a DSR option in raw byte form
buf.
public int getBytes(byte[] buf,
                    int offset)
buf - the buffer to put the option bytes inoffset - the offset into the buffer to start writing at
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
public static RouteDsrMsg.Option create(byte[] buf,
                                        int offset)
Option from the given byte array, starting at
 the given offset.
buf - the DSR option in raw byte formoffset - the offset into buf where the option begins
buf, or null
   if buf is not a recognized option.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||