Here you can find the source of toFloat(byte[] value)
public static float toFloat(byte[] value)
//package com.java2s; //License from project: Open Source License public class Main { public static float toFloat(byte[] value) { int intValue = toInt(value); float result = Float.intBitsToFloat(intValue); return result; }/*from ww w.ja v a 2s. c o m*/ public static int toInt(byte[] value) { return toInt(value, 0); } /** * byte[] -> int * * @param value * @param offset * @return */ public static int toInt(byte[] value, int offset) { int result = 0; result = result | (value[offset + 3] & 0xff); result = result | ((((int) value[offset + 2] & 0xff)) << 8); result = result | ((((int) value[offset + 1] & 0xff)) << 16); result = result | ((((int) value[offset + 0] & 0xff)) << 24); return result; } }