/** * Converts a byte array to an int value. * * @param bytes input byte array to be converted. * @return the int value */ public static int toInt(byte[] bytes) { return toInt(bytes, 0); }
/** * Converts a byte array to an int value. * * @param bytes input byte array. * @param offset input byte array offset. * @return the int value. */ public static int toInt(byte[] bytes, int offset) { return toInt(bytes, offset, SIZEOF_INT); }
/** * Converts a byte array to an int value. * * @param bytes input byte array to be converted. * @return the int value */ public static int toInt(byte[] bytes) { return toInt(bytes, 0); }
/** * Converts a byte array to an int value. * * @param bytes input byte array. * @param offset input byte array offset. * @return the int value. */ public static int toInt(byte[] bytes, int offset) { return toInt(bytes, offset, SIZEOF_INT); }
/** * Presumes float encoded as IEEE 754 floating-point "single format". * * @param bytes input byte array to be considered. * @param offset offset to be considered from byte array. * @return Float made from passed byte array. */ public static float toFloat(byte [] bytes, int offset) { int i = toInt(bytes, offset); return Float.intBitsToFloat(i); } /**
/** * Presumes float encoded as IEEE 754 floating-point "single format". * * @param bytes input byte array to be considered. * @param offset offset to be considered from byte array. * @return Float made from passed byte array. */ public static float toFloat(byte [] bytes, int offset) { int i = toInt(bytes, offset); return Float.intBitsToFloat(i); } /**