de.stz.bt.fnd.datapoints
Class FND_Value

java.lang.Object
  extended byde.stz.bt.fnd.datapoints.FND_Value

public class FND_Value
extends java.lang.Object

Used to convert float and int-values into IEE754 floating point format and vice versa.

Version:
$Id: FND_Value.html,v 1.3 2004/11/08 08:10:43 jseitter Exp $
Author:
Manuel Kempf PGKempf@gmx.de

Field Summary
private  int value
           
 
Constructor Summary
FND_Value()
          Default constructor, doesn't do anything.
FND_Value(byte[] byteValue)
          Constructor, supplied value is stored in IEEE format.
FND_Value(float floatValue)
          Constructor, supplied value is stored in IEEE format.
FND_Value(int intValue)
          Constructor, supplied value is stored in IEEE format.
 
Method Summary
 float getFloatValue()
          Returns float value of stored IEEE-value.
 int getIntValue()
          Returns integer value of stored IEEE-value.
 byte[] getShortRealValue()
          Returns the stored value as a four byte array.
 void setFloatValue(float floatValue)
          Stores float-value as IEEE-value.
 void setIntValue(int intValue)
          Stores Integer-Value in IEEE-format
 void setShortRealValue(byte[] byteValue)
          Stores a byte array of four elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private int value
Constructor Detail

FND_Value

public FND_Value()
Default constructor, doesn't do anything.


FND_Value

public FND_Value(float floatValue)
Constructor, supplied value is stored in IEEE format.

Parameters:
floatValue - Value to be stored.

FND_Value

public FND_Value(int intValue)
Constructor, supplied value is stored in IEEE format.

Parameters:
intValue - Value to be stored.

FND_Value

public FND_Value(byte[] byteValue)
          throws java.lang.IndexOutOfBoundsException
Constructor, supplied value is stored in IEEE format.

Parameters:
byteValue - Value to be stored.
Method Detail

setIntValue

public void setIntValue(int intValue)
Stores Integer-Value in IEEE-format

Parameters:
intValue -

getIntValue

public int getIntValue()
Returns integer value of stored IEEE-value.

Returns:
Integer representation of stored IEEE-value.

setFloatValue

public void setFloatValue(float floatValue)
Stores float-value as IEEE-value.

Parameters:
floatValue - Float-value to be stored.

getFloatValue

public float getFloatValue()
Returns float value of stored IEEE-value.

Returns:
Float representation of stored IEEE-value.

setShortRealValue

public void setShortRealValue(byte[] byteValue)
                       throws java.lang.IndexOutOfBoundsException
Stores a byte array of four elements. No format conversion is done.

Parameters:
byteValue - The byte array to be stored.
Throws:
java.lang.IndexOutOfBoundsException - If the array length is unequal to four.

getShortRealValue

public byte[] getShortRealValue()
Returns the stored value as a four byte array. No format conversion is done.

Returns:
A four byte array containg the stored value.