Here you can find the source of int2ba(int integer)
public static Byte[] int2ba(int integer)
//package com.java2s; //License from project: Open Source License public class Main { public static Byte[] int2ba(int integer) { Byte[] result = new Byte[4]; result[0] = (byte) ((integer & 0xFF000000) >> 24); result[1] = (byte) ((integer & 0x00FF0000) >> 16); result[2] = (byte) ((integer & 0x0000FF00) >> 8); result[3] = (byte) (integer & 0x000000FF); return result; }/*from w w w . jav a 2 s .c o m*/ }