Here you can find the source of toUnsignedBytes(long convert)
public static byte[] toUnsignedBytes(long convert)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] toUnsignedBytes(long convert) { byte[] bytes = new byte[4]; for (int i = 0; i < bytes.length; i++) { bytes[i] = (byte) (convert >> i * 8); }//from w ww . j ava2 s. c o m return bytes; } }