Here you can find the source of intToByte(int v, byte[] dest)
public static final int intToByte(int v, byte[] dest)
//package com.java2s; public class Main { public static final int intToByte(int v, byte[] dest) { int destOffset = 0; dest[destOffset++] = (byte) ((v >> 24) & 0xFF); dest[destOffset++] = (byte) ((v >> 16) & 0xFF); dest[destOffset++] = (byte) ((v >> 8) & 0xFF); dest[destOffset++] = (byte) (v & 0xFF); return destOffset; }/*from w w w . j a v a 2 s . c om*/ }