Here you can find the source of IntToBArray(int src)
static public byte[] IntToBArray(int src)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { static public byte[] IntToBArray(int src) { return ByteBuffer.allocate(4).putInt(src).array(); }/* www . ja va 2 s . c om*/ }