my.usm.gcl.ddbms.client.utils
Class Convertion

java.lang.Object
  extended by my.usm.gcl.ddbms.client.utils.Convertion

public class Convertion
extends java.lang.Object


Field Summary
static int MAX_UBYTE
           
static long MAX_UINT
           
static int MAX_USHORT
           
 
Constructor Summary
Convertion()
           
 
Method Summary
static java.lang.String byteArrayToHex(byte[] a)
           
static int byteArrayToInt(byte[] intBytes)
           
static char byteToChar(byte b)
           
static byte[] byteToUByte(byte x)
           
static byte[] charArray2ByteArray(char[] ca, int lenght)
           
static byte charToByte(char c)
           
static byte[] concatByteArrays(byte[] first, byte[] second)
           
static byte[] intToByteArray(int integer)
           
static byte[] longToUInt(long x)
           
static byte[] padLength16(byte[] input)
           
static byte[] trimArray(byte[] array, int length)
           
static byte[] trimLength(byte[] input)
           
static byte UByteTobyte(byte x)
           
static int uByteToInt(byte value)
           
static long uintToLong(byte[] source)
           
static long uIntToLong(int value)
           
static int uShortToInt(short value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_UBYTE

public static final int MAX_UBYTE
See Also:
Constant Field Values

MAX_USHORT

public static final int MAX_USHORT
See Also:
Constant Field Values

MAX_UINT

public static final long MAX_UINT
See Also:
Constant Field Values
Constructor Detail

Convertion

public Convertion()
Method Detail

uintToLong

public static long uintToLong(byte[] source)

longToUInt

public static byte[] longToUInt(long x)

byteToUByte

public static byte[] byteToUByte(byte x)

UByteTobyte

public static byte UByteTobyte(byte x)

charToByte

public static byte charToByte(char c)

byteToChar

public static char byteToChar(byte b)

charArray2ByteArray

public static byte[] charArray2ByteArray(char[] ca,
                                         int lenght)

uByteToInt

public static int uByteToInt(byte value)

uShortToInt

public static int uShortToInt(short value)

uIntToLong

public static long uIntToLong(int value)

byteArrayToHex

public static final java.lang.String byteArrayToHex(byte[] a)

intToByteArray

public static byte[] intToByteArray(int integer)

byteArrayToInt

public static int byteArrayToInt(byte[] intBytes)

trimLength

public static byte[] trimLength(byte[] input)

padLength16

public static byte[] padLength16(byte[] input)

concatByteArrays

public static byte[] concatByteArrays(byte[] first,
                                      byte[] second)

trimArray

public static byte[] trimArray(byte[] array,
                               int length)