org.asunder.util
Class BitArray

java.lang.Object
  extended by org.asunder.util.BitArray

public class BitArray
extends java.lang.Object

Author:
simms2k

Method Summary
static int firstBitDiscrepancy(byte[] a, byte[] b)
          find the first bit where the two arrays differ assumes byte arrays are of equal length
static byte[] reverseBytes(byte[] a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

reverseBytes

public static byte[] reverseBytes(byte[] a)

firstBitDiscrepancy

public static int firstBitDiscrepancy(byte[] a,
                                      byte[] b)
find the first bit where the two arrays differ assumes byte arrays are of equal length

Returns:
the index of the first mismatch, or the number of bits in the shorter array