Here you can find the source of byteArrayToFloat(byte[] array)
public static float byteArrayToFloat(byte[] array)
//package com.java2s; //License from project: LGPL public class Main { public static float byteArrayToFloat(byte[] array) { byte[] tmp = new byte[4]; System.arraycopy(array, 0, tmp, 0, 4); int accum = 0; int i = 0; for (int shiftBy = 0; shiftBy < 32; shiftBy += 8) { accum |= ((long) (tmp[i++] & 0xff)) << shiftBy; }//from w ww. j a v a2s . com return Float.intBitsToFloat(accum); } }