be.cardon.utils
Class ByteArrayTools

java.lang.Object
  extended by be.cardon.utils.ByteArrayTools

public class ByteArrayTools
extends java.lang.Object

Reverses a byte array, or compares two byte arrays.


Constructor Summary
ByteArrayTools()
           
 
Method Summary
static boolean equals(byte[] a, byte[] b)
          Compare two byte arrays.
static byte[] reverseByteArray(byte[] byteArray)
          Reverse the byte order of a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayTools

public ByteArrayTools()
Method Detail

reverseByteArray

public static byte[] reverseByteArray(byte[] byteArray)
Reverse the byte order of a byte array. Use this function for small byte arrays (this function use a copy of the array, so don't use it for big arrays)


equals

public static boolean equals(byte[] a,
                             byte[] b)
Compare two byte arrays. Returns true if the size of two arrays are equal AND if each byte of the arrays are equal.