Here you can find the source of toFloat(ByteBuffer value)
public static float toFloat(ByteBuffer value)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { public static float toFloat(ByteBuffer value) { float result = 0f; try {//from w ww. j a va 2 s . co m if (value != null) { int originPos = value.position(); result = value.getFloat(); value.position(originPos); } } catch (Exception ex) { // ex.printStackTrace(); } return result; } }