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