io
Class Bytes

java.lang.Object
  extended by io.Bytes

public class Bytes
extends java.lang.Object


Constructor Summary
Bytes()
           
 
Method Summary
static boolean booleanValue(byte[] value)
          Get the short value represented by this byte[], using standard Java serialisation
static double doubleValue(byte[] value)
           
static float floatValue(byte[] value)
           
static byte[] getBytes(boolean value)
          Get a byte[] representing the specified value, using standard Java serialization.
static byte[] getBytes(double value)
           
static byte[] getBytes(float value)
           
static byte[] getBytes(int value)
           
static byte[] getBytes(long value)
           
static byte[] getBytes(java.lang.Object obj)
          Get a byte[] representation of the specified object, using standard Java serialisation.
static byte[] getBytes(short value)
           
static int intValue(byte[] value)
           
static long longValue(byte[] value)
           
static java.lang.Object objectValue(byte[] value)
          Get the object represented by this byte[], using standard Java serialisation
static short shortValue(byte[] value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bytes

public Bytes()
Method Detail

getBytes

public static byte[] getBytes(int value)
                       throws hla.rti13.java1.RTIinternalError
Throws:
hla.rti13.java1.RTIinternalError

intValue

public static int intValue(byte[] value)
                    throws hla.rti13.java1.FederateInternalError
Throws:
hla.rti13.java1.FederateInternalError

getBytes

public static byte[] getBytes(double value)
                       throws hla.rti13.java1.RTIinternalError
Throws:
hla.rti13.java1.RTIinternalError

doubleValue

public static double doubleValue(byte[] value)
                          throws hla.rti13.java1.FederateInternalError
Throws:
hla.rti13.java1.FederateInternalError

getBytes

public static byte[] getBytes(float value)
                       throws hla.rti13.java1.RTIinternalError
Throws:
hla.rti13.java1.RTIinternalError

floatValue

public static float floatValue(byte[] value)
                        throws hla.rti13.java1.FederateInternalError
Throws:
hla.rti13.java1.FederateInternalError

getBytes

public static byte[] getBytes(short value)
                       throws hla.rti13.java1.RTIinternalError
Throws:
hla.rti13.java1.RTIinternalError

shortValue

public static short shortValue(byte[] value)
                        throws hla.rti13.java1.FederateInternalError
Throws:
hla.rti13.java1.FederateInternalError

getBytes

public static byte[] getBytes(long value)
                       throws hla.rti13.java1.RTIinternalError
Throws:
hla.rti13.java1.RTIinternalError

longValue

public static long longValue(byte[] value)
                      throws hla.rti13.java1.FederateInternalError
Throws:
hla.rti13.java1.FederateInternalError

getBytes

public static byte[] getBytes(java.lang.Object obj)
                       throws hla.rti13.java1.RTIinternalError
Get a byte[] representation of the specified object, using standard Java serialisation.

Parameters:
obj - the object to be serialized
Returns:
the array representing the object
Throws:
java.io.NotSerializableException - if the given object does not implement the Serializable interface
hla.rti13.java1.FederateInternalError - if some other error occurs while reading the object
hla.rti13.java1.RTIinternalError

objectValue

public static java.lang.Object objectValue(byte[] value)
                                    throws hla.rti13.java1.FederateInternalError
Get the object represented by this byte[], using standard Java serialisation

Parameters:
value - a byte[] representing an object in standard Java serialisation
Returns:
the Object represented
Throws:
java.lang.ClassNotFoundException - if the current runtime does not contain the class of the the de-serialized object.
java.io.InvalidClassException - if the object is not a valid Class type for this Java runtime.
hla.rti13.java1.FederateInternalError - if any other error is found in the byte[]

getBytes

public static byte[] getBytes(boolean value)
                       throws hla.rti13.java1.RTIinternalError
Get a byte[] representing the specified value, using standard Java serialization.

Parameters:
value - the boolean to be serialized
Returns:
the array representing the boolean
Throws:
hla.rti13.java1.RTIinternalError

booleanValue

public static boolean booleanValue(byte[] value)
                            throws hla.rti13.java1.FederateInternalError
Get the short value represented by this byte[], using standard Java serialisation

Parameters:
value - a byte[] representing a short in standard Java serialisation
Returns:
the short value represented
Throws:
hla.rti13.java1.FederateInternalError - if the byte[] is not a standard Java representation of a short type.