Java tutorial
//package com.java2s; import java.io.DataOutputStream; import java.io.IOException; public class Main { public static void writeInt(final DataOutputStream output, final int value) throws IOException { output.write(value >> 0); output.write(value >> 8); output.write(value >> 16); output.write(value >> 24); } }