Here you can find the source of iToB(int[] intVals)
public static final byte[] iToB(int[] intVals)
//package com.java2s; //License from project: Open Source License public class Main { public static final byte[] iToB(int[] intVals) { byte[] byteVals = new byte[intVals.length]; for (int i = 0; i < byteVals.length; i++) { byteVals[i] = (byte) intVals[i]; }/*from ww w . j a v a 2 s. c om*/ return byteVals; } }