com.compoze.collab.util
Class Convert

java.lang.Object
  extended by com.compoze.collab.util.Convert
All Implemented Interfaces
Serializable

public class Convert
extends Object
implements Serializable

Conversion methods for primitive types.

See Also
Serialized Form

Constructor Summary
Convert()
           
 
Method Summary
static byte[] getBytesFromDouble(double d)
          Gets an array of bytes from a double.
static byte[] getBytesFromFloat(float f)
          Gets an array of bytes from a float.
static byte[] getBytesFromInt(int iInt)
          Get an array of bytes from a int.
static byte[] getBytesFromLong(long lLong)
          Get an array of bytes from a long.
static byte[] getBytesFromShort(short sShort)
          Get an array of bytes from a int.
 double getDoubleFromBytes(byte[] bytes)
          Gets a double from an array of bytes.
 float getFloatFromBytes(byte[] bytes)
          Gets a float from an array of bytes.
static int getIntFromBytes(byte[] byteArray)
          Get a int from an array of bytes;
static long getLongFromBytes(byte[] byteArray)
          Get a long from an array of bytes;
static short getShortFromBytes(byte[] byteArray)
          Get a short from an array of bytes;
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Convert

public Convert()
Method Detail

getLongFromBytes

public static long getLongFromBytes(byte[] byteArray)
Get a long from an array of bytes;

Parameters
array - the array of bytes (not null)
Returns
the long

getBytesFromLong

public static byte[] getBytesFromLong(long lLong)
Get an array of bytes from a long.

Parameters
lLong - the long
Returns
the array of bytes (not null)

getIntFromBytes

public static int getIntFromBytes(byte[] byteArray)
Get a int from an array of bytes;

Parameters
array - the array of bytes (not null)
Returns
the int

getBytesFromInt

public static byte[] getBytesFromInt(int iInt)
Get an array of bytes from a int.

Parameters
iInt - the int
Returns
the array of bytes (not null)

getShortFromBytes

public static short getShortFromBytes(byte[] byteArray)
Get a short from an array of bytes;

Parameters
array - the array of bytes (not null)
Returns
the short

getBytesFromShort

public static byte[] getBytesFromShort(short sShort)
Get an array of bytes from a int.

Parameters
iInt - the int
Returns
the array of bytes (not null)

getBytesFromDouble

public static byte[] getBytesFromDouble(double d)
Gets an array of bytes from a double.

Parameters
d - the double
Returns
the byte array

getDoubleFromBytes

public double getDoubleFromBytes(byte[] bytes)
Gets a double from an array of bytes.

Parameters
bytes - the bytes
Returns
the double

getBytesFromFloat

public static byte[] getBytesFromFloat(float f)
Gets an array of bytes from a float.

Parameters
f - the float
Returns
the byte array

getFloatFromBytes

public float getFloatFromBytes(byte[] bytes)
Gets a float from an array of bytes.

Parameters
bytes - the bytes
Returns
the float


Copyright © 2006 BEA Systems, Inc. All Rights Reserved