Public Member Functions | |
FND_Value () | |
FND_Value (float floatValue) | |
FND_Value (int intValue) | |
FND_Value (byte[] byteValue) throws IndexOutOfBoundsException | |
void | setIntValue (int intValue) |
int | getIntValue () |
void | setFloatValue (float floatValue) |
float | getFloatValue () |
void | setShortRealValue (byte[] byteValue) throws IndexOutOfBoundsException |
byte[] | getShortRealValue () |
|
Default constructor, doesn't do anything.
00029 {} |
|
Constructor, supplied value is stored in IEEE format.
00036 {
00037 this.setFloatValue(floatValue);
00038 }
|
|
Constructor, supplied value is stored in IEEE format.
00045 {
00046 this.setIntValue(intValue);
00047 }
|
|
Constructor, supplied value is stored in IEEE format.
00054 {
00055 this.setShortRealValue(byteValue);
00056 }
|
|
Returns float value of stored IEEE-value.
00090 {
00091 return Float.intBitsToFloat(value);
00092 }
|
|
Returns integer value of stored IEEE-value.
00071 { 00072 int returnValue = (int)Float.intBitsToFloat(value); 00073 return returnValue; 00074 } |
|
Returns the stored value as a four byte array. No format conversion is done.
00117 { 00118 byte[] returnValue = new byte[4]; 00119 returnValue[0] = (byte) (value >>> 24); 00120 returnValue[1] = (byte)((value >>> 16) & 0x00FF); 00121 returnValue[2] = (byte)((value >>> 8) & 0x0000FF); 00122 returnValue[3] = (byte)(value & 0x000000FF); 00123 return returnValue; 00124 } |
|
Stores float-value as IEEE-value.
00081 {
00082 this.value = Float.floatToIntBits(floatValue);
00083 }
|
|
Stores Integer-Value in IEEE-format
00062 { 00063 this.value = Float.floatToIntBits((float)intValue); 00064 } |
|
Stores a byte array of four elements. No format conversion is done.
00102 { 00103 if (byteValue.length != 4) { 00104 throw (new IndexOutOfBoundsException("FND_Value.setShortRealValue: valueArray-length unequal to 4, current length="+byteValue.length+" required length = 4 Bytes")); 00105 } 00106 this.value = (byteValue[0] << 24); 00107 this.value += (byteValue[1] << 16); 00108 this.value += (byteValue[2] << 8); 00109 this.value += (byteValue[3]); 00110 } |