|
|||||||||
| 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.LBMSDMRawDouble
public class LBMSDMRawDouble
An LBMSDMRawDouble is a helper class to minimise the effort of formatting and parsing Doubles
| Field Summary | |
|---|---|
static int |
length
The length of a raw double |
| Fields inherited from class com.latencybusters.lbm.sdm.LBMSDM |
|---|
DEBUG_BASIC, debug_level, DEBUG_VERBOSE_PARSING |
| Constructor Summary | |
|---|---|
LBMSDMRawDouble()
Create a raw double object, setting the value to 0 |
|
LBMSDMRawDouble(double v)
Create a raw double object providing the value |
|
| Method Summary | |
|---|---|
int |
format(byte[] buf,
int offset)
Format the raw double value into a byte buffer |
static int |
format(byte[] buf,
int offset,
double v)
Format a double value into a byte buffer |
static double |
parse_s(byte[] buf,
int offset)
Parse the raw double value from a byte buffer |
int |
parse(byte[] buf,
int offset)
Parse the raw double value from a byte buffer The value is stored in the object. |
void |
set(double v)
Set the raw double from a double field |
double |
toDouble()
Get the double value of this raw double |
java.lang.String |
toString()
Get a string representing the raw double value |
| 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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int length
| Constructor Detail |
|---|
public LBMSDMRawDouble()
throws LBMSDMException
LBMSDMException
public LBMSDMRawDouble(double v)
throws LBMSDMException
v - The value of the raw double
LBMSDMException| Method Detail |
|---|
public void set(double v)
throws LBMSDMException
v - The value the raw double needs to be set to
LBMSDMException
public static int format(byte[] buf,
int offset,
double v)
throws LBMSDMException
buf - The buffer to contain the formatted valueoffset - The offset in to the buffer to start formattingv - The value of the double to be formatted
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 double 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 double toDouble()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||