Here you can find the source of floatToByteArray(float value)
public static byte[] floatToByteArray(float value)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] floatToByteArray(float value) { int l = Float.floatToIntBits(value); return intToByteArray(l); }/*w w w .ja va2 s.c om*/ public static byte[] intToByteArray(int value) { return new byte[] { (byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8), (byte) value }; } }