Here you can find the source of longToByte(long[] values)
public static byte[] longToByte(long[] values)
//package com.java2s; public class Main { public static byte[] longToByte(long[] values) { if (values == null) { return null; }/*from w w w . j a v a 2s .c o m*/ byte[] results = new byte[values.length]; for (int i = 0; i < values.length; i++) { results[i] = (byte) values[i]; } return results; } }