Here you can find the source of getFloat(ByteBuffer floatCalculator, byte[] bytes)
Parameter | Description |
---|---|
floatCalculator | Buffer to do the conversion |
bytes | The bytes |
public static float getFloat(ByteBuffer floatCalculator, byte[] bytes)
//package com.java2s; //License from project: LGPL import java.nio.ByteBuffer; public class Main { /**/*from w ww . j a v a 2s .co m*/ * Calculates the corresponding float given 4 sequential bytes. * @param floatCalculator Buffer to do the conversion * @param bytes The bytes * @return Float value of the bytes */ public static float getFloat(ByteBuffer floatCalculator, byte[] bytes) { floatCalculator.clear(); floatCalculator.put(bytes); floatCalculator.position(0); return floatCalculator.getFloat(); } }