Java tutorial
//package com.java2s; import java.io.DataOutputStream; import java.io.IOException; public class Main { public static void writeFloat(DataOutputStream os, float f) throws IOException { writeInt(os, Float.floatToIntBits(f)); } public static void writeInt(DataOutputStream os, int i) throws IOException { os.writeInt(Integer.reverseBytes(i)); } }