Here you can find the source of intToByte(int i_Value)
public static byte[] intToByte(int i_Value)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] intToByte(int i_Value) { byte[] v_Ret = new byte[4]; v_Ret[0] = (byte) ((i_Value >>> 24) & 0xFF); v_Ret[1] = (byte) ((i_Value >>> 16) & 0xFF); v_Ret[2] = (byte) ((i_Value >>> 8) & 0xFF); v_Ret[3] = (byte) ((i_Value >>> 0) & 0xFF); return v_Ret; }/* w ww . j a v a2s .c o m*/ }