Here you can find the source of writeInt(OutputStream out, int i)
public static final void writeInt(OutputStream out, int i) throws IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.io.OutputStream; public class Main { public static final void writeInt(OutputStream out, int i) throws IOException { byte[] b = new byte[4]; b[0] = (byte) (i & 0xff); b[1] = (byte) (i >>> 8); b[2] = (byte) (i >>> 16); b[3] = (byte) (i >>> 24); out.write(b);/*from w w w . j ava 2 s .com*/ } public static final void write(OutputStream out, byte b) throws IOException { out.write(b & 0xff); } }