Here you can find the source of intToBytes(final int i)
public static byte[] intToBytes(final int i)
//package com.java2s; public class Main { public static byte[] intToBytes(final int i) { return new byte[] { (byte) (i >>> 24), (byte) (i >>> 16), (byte) (i >>> 8), (byte) i }; }/* w ww . jav a2 s .c om*/ }