// Convert arguments to a contiguous block; it's easier to do
63 // memory management in Java than in C.
64 byte[][] args = new byte[cmdarray.length-1][];
65 int size = args.length; // For added NUL bytes
66 for (int i = 0; i < args.length; i++) {
67 args[i] = cmdarray[i+1].getBytes();
68 size += args[i].length;
69 }
70 byte[] argBlock = new byte[size];
71 int i = 0;
72 for (byte[] arg : args) {
73 System.arraycopy(arg, 0, argBlock, i, arg.length);