List of utility methods to do Byte Array to Double Convert
double | bytesBE2double(byte[] b, int off) bytes B Edouble return Double.longBitsToDouble(bytesBE2long(b, off)); |
double[] | bytesBE2doubles(byte[] b) bytes B Edoubles if (b == null) return null; if ((b.length & 0x7) != 0) throw new IllegalArgumentException("byte[" + b.length + "]"); double[] val = new double[b.length >> 3]; for (int i = 0; i < val.length; i++) val[i] = bytesBE2double(b, i << 3); return val; ... |
double | bytesLE2double(byte[] b, int off) bytes L Edouble return Double.longBitsToDouble(bytesLE2long(b, off)); |
double[] | bytesLE2doubles(byte[] b) bytes L Edoubles if (b == null) return null; if ((b.length & 0x7) != 0) throw new IllegalArgumentException("byte[" + b.length + "]"); double[] val = new double[b.length >> 3]; for (int i = 0; i < val.length; i++) val[i] = bytesLE2double(b, i << 3); return val; ... |
double | getDouble(byte[] b, int index) get Double long l; l = b[index + 0]; l &= 0xff; l |= ((long) b[index + 1] << 8); l &= 0xffff; l |= ((long) b[index + 2] << 16); l &= 0xffffff; l |= ((long) b[index + 3] << 24); ... |
double | getDouble(byte[] buf, boolean bigEndian) Convert byte sequence into java double from first 8 bytes return Double.longBitsToDouble(getLong(buf, bigEndian));
|
double | getDouble(byte[] bytes) get Double long l = getLong(bytes); return Double.longBitsToDouble(l); |
double | toDouble(byte[] b, int pos) to Double long l; l = b[pos]; l &= 0xff; l |= ((long) b[pos + 1] << 8); l &= 0xffff; l |= ((long) b[pos + 2] << 16); l &= 0xffffff; l |= ((long) b[pos + 3] << 24); ... |
double | toDouble(byte[] b, int pos, int width) to Double double retVal = Double.MAX_VALUE; switch (width) { case 1: case 2: case 4: return (double) toInteger(b, pos, width); case 8: return toDouble(b, pos); ... |
double | byteToDouble(byte[] b) byte To Double if (b.length != 8) { return -1; long l; l = b[0]; l &= 0xff; l |= ((long) b[1] << 8); l &= 0xffff; ... |