Here you can find the source of floatToByte(Float f)
public static byte[] floatToByte(Float f)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] floatToByte(Float f) { return String.valueOf(f).getBytes(); }//from w w w.j av a 2 s.co m }