package Wang;
public class LongToByte {
public static void main(String[] arg){
long num = 88888;
byte[] b = long2bytes(num);
for(int i = 0 ;i < b.length;i++)
System.out.println(b[i]);
System.out.println(Math.pow(2, 16) + Math.pow(2, 8)*91 + 56);
}
public static byte[] long2bytes(long num) {
byte[] b = new byte[8];
for (int i=0;i<8;i++) {
b[i] = (byte)(num>>>(56-(i*8)));
}
return b;
}
}