Here you can find the source of fromInt(int key)
public static byte[] fromInt(int key)
//package com.java2s; // BSD License (http://lemurproject.org/galago-license) public class Main { public static byte[] fromInt(int key) { byte[] converted = new byte[4]; converted[0] = (byte) ((key >>> 24) & 0xFF); converted[1] = (byte) ((key >>> 16) & 0xFF); converted[2] = (byte) ((key >>> 8) & 0xFF); converted[3] = (byte) (key & 0xFF); return converted; }//from www. j a v a2 s. co m }