/** * Converts a byte array to a long value. * * @param bytes input byte array. * @return the long value. */ public static long toLong(byte[] bytes) { return toLong(bytes, 0); }
/** * Converts a byte array to a long value. * * @param bytes input byte array. * @param offset offset to be from the input byte array. * @return the long value. */ public static long toLong(byte[] bytes, int offset) { return toLong(bytes, offset, SIZEOF_LONG); }
/** * Converts a byte array to a long value. * * @param bytes input byte array. * @return the long value. */ public static long toLong(byte[] bytes) { return toLong(bytes, 0); }
/** * Converts a byte array to a long value. * * @param bytes input byte array. * @param offset offset to be from the input byte array. * @return the long value. */ public static long toLong(byte[] bytes, int offset) { return toLong(bytes, offset, SIZEOF_LONG); }
/** * Converts byte array given offset to double value. * * @param bytes input byte array. * @param offset offset to be considered from input array. * @return Return double made from passed bytes. */ public static double toDouble(final byte [] bytes, final int offset) { long l = toLong(bytes, offset); return Double.longBitsToDouble(l); }
/** * Converts byte array given offset to double value. * * @param bytes input byte array. * @param offset offset to be considered from input array. * @return Return double made from passed bytes. */ public static double toDouble(final byte [] bytes, final int offset) { long l = toLong(bytes, offset); return Double.longBitsToDouble(l); }