|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.latencybusters.lbm.sdm.LBMSDM
com.latencybusters.lbm.sdm.LBMSDMRaw
com.latencybusters.lbm.sdm.LBMSDMRawUint32
public class LBMSDMRawUint32
An LBMSDMRawUint32 is a helper class to minimise the effort of formatting and parsing unsigned 32 bit integers
| Field Summary | |
|---|---|
static int |
length
The number of bytes needed to store a raw LBMSDMRawUint32 |
| Fields inherited from class com.latencybusters.lbm.sdm.LBMSDM |
|---|
DEBUG_BASIC, debug_level, DEBUG_VERBOSE_PARSING |
| Constructor Summary | |
|---|---|
LBMSDMRawUint32()
Create a raw uint32 field, defaulting to 0 |
|
LBMSDMRawUint32(long v)
Set a raw uint16 field providing the value as a long |
|
| Method Summary | |
|---|---|
LBMSDMRawUint32 |
clone()
Get a copy of this object |
int |
format(byte[] buf,
int offset)
Format the raw uint32 value into a byte buffer |
static int |
format(byte[] buf,
int offset,
long v)
Format a uint32 value into a byte buffer |
static long |
parse_s(byte[] buf,
int offset)
Parse the raw uint32 value from a byte buffer |
int |
parse(byte[] buf,
int offset)
Parse the raw uint32 value from a byte buffer |
void |
set(long v)
Set a uint32 field providing the value as a long |
long |
toLong()
Get the long representation of the uint32 |
java.lang.String |
toString()
Get a string version of an uint16 |
| Methods inherited from class com.latencybusters.lbm.sdm.LBMSDMRaw |
|---|
toDbgString |
| Methods inherited from class com.latencybusters.lbm.sdm.LBMSDM |
|---|
log, set_debug_level |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int length
| Constructor Detail |
|---|
public LBMSDMRawUint32()
throws LBMSDMException
LBMSDMException
public LBMSDMRawUint32(long v)
throws LBMSDMException
v - The long to seed this raw object
LBMSDMUnsignedException - if an unsigned value is passed in
LBMSDMException| Method Detail |
|---|
public void set(long v)
throws LBMSDMException
v - The long to seed this raw object
LBMSDMUnsignedException - if an unsigned value is passed in
LBMSDMException
public static int format(byte[] buf,
int offset,
long v)
throws LBMSDMException
buf - The buffer to contain the formatted valueoffset - The offset in to the buffer to start formattingv - The value of the uint32 to be formatted as a long
LBMSDMException
public int format(byte[] buf,
int offset)
throws LBMSDMException
buf - The buffer to contain the formatted valueoffset - The offset in to the buffer to start formatting
LBMSDMExceptionpublic java.lang.String toString()
toString in class java.lang.Object
public static long parse_s(byte[] buf,
int offset)
throws LBMSDMException
buf - The buffer that contains the formatted valueoffset - The offset in to the buffer to start parsing
LBMSDMException
public int parse(byte[] buf,
int offset)
throws LBMSDMException
buf - The buffer that contains the formatted valueoffset - The offset in to the buffer to start parsing
LBMSDMExceptionpublic long toLong()
public LBMSDMRawUint32 clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||