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