Here you can find the source of writeInt2BE(OutputStream out, int v)
public static void writeInt2BE(OutputStream out, int v) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.OutputStream; public class Main { public static void writeInt2BE(OutputStream out, int v) throws IOException { out.write((int) ((v >> 8) & 0xFF)); out.write((int) (v & 0xFF)); }// www .ja v a 2 s. co m }