bitronix.tm.utils
Class Encoder

java.lang.Object
  extended by bitronix.tm.utils.Encoder

public class Encoder
extends Object

Number to byte array and byte array to number encoder.

Author:
lorban

Constructor Summary
Encoder()
           
 
Method Summary
static int bytesToInt(byte[] bytes, int pos)
           
static long bytesToLong(byte[] bytes, int pos)
           
static byte[] intToBytes(int anInt)
           
static byte[] longToBytes(long aLong)
           
static byte[] shortToBytes(short aShort)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Encoder

public Encoder()
Method Detail

longToBytes

public static byte[] longToBytes(long aLong)

intToBytes

public static byte[] intToBytes(int anInt)

shortToBytes

public static byte[] shortToBytes(short aShort)

bytesToLong

public static long bytesToLong(byte[] bytes,
                               int pos)

bytesToInt

public static int bytesToInt(byte[] bytes,
                             int pos)


Copyright © 2006-2013 Bitronix Software. All Rights Reserved.