Here you can find the source of byteArrayToFloat(byte[] bytes)
public static Float byteArrayToFloat(byte[] bytes)
//package com.java2s; //License from project: Apache License public class Main { public static Float byteArrayToFloat(byte[] bytes) { int bits = byteArrayToInt(bytes); return Float.intBitsToFloat(bits); }/* www . j a v a 2s. c om*/ public static Integer byteArrayToInt(byte[] bytes) { int number = 0; int byteLength = bytes.length; for (int i = 0; i < byteLength; i++) { number |= ((int) (bytes[byteLength - i - 1] & 0xff) << (8 * i)); } return number; } }