Here you can find the source of toByteArrayShifted2(int[][] intArray)
public static byte[][] toByteArrayShifted2(int[][] intArray)
//package com.java2s; /**/* w w w . ja va 2 s . com*/ * This class is part of JCodec ( www.jcodec.org ) This software is distributed * under FreeBSD License * * @author Jay Codec * */ public class Main { public static byte[][] toByteArrayShifted2(int[][] intArray) { byte[][] result = new byte[intArray.length][]; for (int i = 0; i < intArray.length; i++) { result[i] = toByteArrayShifted(intArray[i]); } return result; } public static byte[] toByteArrayShifted(int... arguments) { byte[] result = new byte[arguments.length]; for (int i = 0; i < arguments.length; i++) result[i] = (byte) (arguments[i] - 128); return result; } }