cgl.narada.transport.util
Class BytesUtil

java.lang.Object
  extended by cgl.narada.transport.util.BytesUtil

public class BytesUtil
extends Object


Constructor Summary
BytesUtil()
           
 
Method Summary
static int bytesToInt(byte[] buf)
           
static long bytesToLong(byte[] bytes)
           
static byte[] intToBytes(int i)
           
static byte[] longToBytes(long l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BytesUtil

public BytesUtil()
Method Detail

longToBytes

public static byte[] longToBytes(long l)
Parameters:
l - long
Returns:
byte array for the given long integer

bytesToLong

public static long bytesToLong(byte[] bytes)
Parameters:
bytes - array of size 8
Returns:
long integer converted

intToBytes

public static byte[] intToBytes(int i)
Parameters:
i - int
Returns:
byte array for that given int

bytesToInt

public static int bytesToInt(byte[] buf)
Parameters:
buf - byte array of size 4
Returns:
int converted from given byte array


For comments and suggestions please send e-mail to The NaradaBrokering Project