public class BitUtils
extends java.lang.Object
| Constructor and Description | 
|---|
| BitUtils() | 
| Modifier and Type | Method and Description | 
|---|---|
| static byte[] | reverseBitSignificance(byte... bytes)returns an array of bytes where the bits in each byte have been reversed;
 note however the order of the arguments is not reversed;
 useful e.g. | 
| static byte | reverseBitSignificance(byte b)reverses the bits in a byte, i.e. | 
| static byte | reverseBitSignificanceInByte(int b)as  reverseBitSignificance(byte)but accepting int for convenience | 
| static byte[] | reverseBitSignificanceInBytes(int... bytes)as  reverseBitSignificance(byte...), but taking ints for convenience (ignoring high bits) | 
| static int | unsigned(byte b)why oh why are bytes signed! | 
| static int | unsignedByte(int b)returns the value in 0..255 which is equivalent mod 256 | 
public static byte reverseBitSignificance(byte b)
public static byte reverseBitSignificanceInByte(int b)
reverseBitSignificance(byte) but accepting int for conveniencepublic static byte[] reverseBitSignificance(byte... bytes)
public static byte[] reverseBitSignificanceInBytes(int... bytes)
reverseBitSignificance(byte...), but taking ints for convenience (ignoring high bits)public static int unsigned(byte b)
public static int unsignedByte(int b)