IBM Bank Transformation Toolkit Javadoc

com.ibm.btt.format.impl
Class HexCodecUtil

java.lang.Object
  extended by com.ibm.btt.format.impl.HexCodecUtil

public class HexCodecUtil
extends java.lang.Object


Constructor Summary
HexCodecUtil()
           
 
Method Summary
static byte[] bytesReverseOrder(byte[] b)
          reverse the sequence of byte[]
static java.lang.String bytesToString(byte[] b)
          convert byte[] to String
static byte[] decodeHex(char[] data)
           
static char[] encodeHex(byte[] data)
           
static double hBytesToDouble(byte[] b)
           
static float hBytesToFloat(byte[] b)
          convert HL byte[] to float
static int hBytesToInt(byte[] b)
          convert HL byte[] to int
static long hBytesToLong(byte[] b)
           
static short hBytesToShort(byte[] b)
          convert HL byte[] to short
static double lBytesToDouble(byte[] b)
           
static float lBytesToFloat(byte[] b)
          convert LH byte[] to float
static int lBytesToInt(byte[] b)
          convert LH byte[] to int
static long lBytesToLong(byte[] b)
           
static short lBytesToShort(byte[] b)
          convert LH byte[] to short
static byte[] stringToBytes(java.lang.String s)
          convert String to byte[]
protected static int toDigit(char ch, int index)
           
static byte[] toHL(double value)
           
static byte[] toHL(float f)
          convert float to byte[] in HL sequence
static byte[] toHL(int n)
          convert int to HL byte[]
static byte[] toHL(long n)
           
static byte[] toHL(short n)
          convert short to HL byte[]
static byte[] toLH(double value)
           
static byte[] toLH(float f)
          convert float to byte[] in LH sequence
static byte[] toLH(int n)
          convert int to LH byte[]
static byte[] toLH(long n)
           
static byte[] toLH(short n)
          convert short to LH byte[]
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HexCodecUtil

public HexCodecUtil()
Method Detail

decodeHex

public static byte[] decodeHex(char[] data)

toDigit

protected static int toDigit(char ch,
                             int index)

encodeHex

public static char[] encodeHex(byte[] data)

toLH

public static byte[] toLH(int n)
convert int to LH byte[]

Parameters:
n - int
Returns:
byte[]

toHL

public static byte[] toHL(int n)
convert int to HL byte[]

Parameters:
n - int
Returns:
byte[]

toLH

public static byte[] toLH(long n)

toHL

public static byte[] toHL(long n)

toLH

public static byte[] toLH(short n)
convert short to LH byte[]

Parameters:
n - short
Returns:
byte[]

toHL

public static byte[] toHL(short n)
convert short to HL byte[]

Parameters:
n - short
Returns:
byte[]

toLH

public static byte[] toLH(float f)
convert float to byte[] in LH sequence


toHL

public static byte[] toHL(float f)
convert float to byte[] in HL sequence


toHL

public static byte[] toHL(double value)

toLH

public static byte[] toLH(double value)

bytesToString

public static java.lang.String bytesToString(byte[] b)
convert byte[] to String

Parameters:
b - byte[]
Returns:
String

stringToBytes

public static byte[] stringToBytes(java.lang.String s)
convert String to byte[]

Parameters:
s - String
Returns:
byte[]

hBytesToInt

public static int hBytesToInt(byte[] b)
convert HL byte[] to int

Parameters:
b - byte[]
Returns:
int

lBytesToInt

public static int lBytesToInt(byte[] b)
convert LH byte[] to int

Parameters:
b - byte[]
Returns:
int

hBytesToLong

public static long hBytesToLong(byte[] b)

lBytesToLong

public static long lBytesToLong(byte[] b)

hBytesToShort

public static short hBytesToShort(byte[] b)
convert HL byte[] to short

Parameters:
b - byte[]
Returns:
short

lBytesToShort

public static short lBytesToShort(byte[] b)
convert LH byte[] to short

Parameters:
b - byte[]
Returns:
short

hBytesToFloat

public static float hBytesToFloat(byte[] b)
convert HL byte[] to float

Parameters:
b - byte[]
Returns:
float

lBytesToFloat

public static float lBytesToFloat(byte[] b)
convert LH byte[] to float

Parameters:
b - byte[]
Returns:
float

hBytesToDouble

public static double hBytesToDouble(byte[] b)

lBytesToDouble

public static double lBytesToDouble(byte[] b)

bytesReverseOrder

public static byte[] bytesReverseOrder(byte[] b)
reverse the sequence of byte[]


IBM Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2008