Here you can find the source of toFloatEx(byte[] b, int pos)
public static float toFloatEx(byte[] b, int pos)
//package com.java2s; import java.nio.ByteBuffer; import java.nio.FloatBuffer; public class Main { public static float toFloatEx(byte[] b, int pos) { try {// w w w . ja va 2 s . c om byte[] byteTmp = new byte[4]; for (int i = 0; i < 4; i++) { byteTmp[i] = b[pos + i]; } ByteBuffer bb = ByteBuffer.wrap(byteTmp); FloatBuffer fb = bb.asFloatBuffer(); return fb.get(); } catch (Exception e) { e.printStackTrace(); return 0.0f; } } }