Here you can find the source of unsigned32ToBytes(long value)
public static byte[] unsigned32ToBytes(long value)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] unsigned32ToBytes(long value) { return toBytes(value, 4); }// ww w . j a v a 2 s . c om public static byte[] toBytes(long value, int len) { byte[] array = new byte[len]; for (int i = 0; i < len; i++) { array[i] = (byte) (value >>> ((len - i - 1) * 8)); } return array; } }