Here you can find the source of encodeUInt32(int value, OutputStream out)
private static void encodeUInt32(int value, OutputStream out) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.OutputStream; public class Main { private static void encodeUInt32(int value, OutputStream out) throws IOException { byte[] tmp = new byte[4]; tmp[0] = (byte) ((value >>> 24) & 0xff); tmp[1] = (byte) ((value >>> 16) & 0xff); tmp[2] = (byte) ((value >>> 8) & 0xff); tmp[3] = (byte) (value & 0xff); out.write(tmp);//from w w w. j a v a 2 s .c om } }