Here you can find the source of intToByteArray(int value)
public static final byte[] intToByteArray(int value)
//package com.java2s; public class Main { public static final byte[] intToByteArray(int value) { return new byte[] { (byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8), (byte) value }; }//from w w w . j ava 2 s.c o m }