List of utility methods to do Long to Binary
void | long2bin(byte[] out, int offset, long i) longbin out[offset + 0] = (byte) (i >> 56); out[offset + 1] = (byte) (i >> 48 & 0xff); out[offset + 2] = (byte) (i >> 40 & 0xff); out[offset + 3] = (byte) (i >> 32 & 0xff); out[offset + 4] = (byte) (i >> 24 & 0xff); out[offset + 5] = (byte) (i >> 16 & 0xff); out[offset + 6] = (byte) (i >> 8 & 0xff); out[offset + 7] = (byte) (i & 0xff); ... |
String | long2binString(long x) longbin String String s = ""; for (int ii = 0; ii < 64; ii++) { if ((ii > 0) && (ii % 4 == 0)) { s = " " + s; s = hex_digit[(int) ((x & (1L << ii)) >>> ii)] + s; return s; ... |