Here you can find the source of integerToBytes(int value)
public static byte[] integerToBytes(int value)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] integerToBytes(int value) { return new byte[] { (byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8), (byte) value }; }/* w ww .j a va2s . co m*/ }