static ArrayList byteArrayToList(byte[] a) { if (a == null) null; ret byteArrayToList(a, 0, a.length); } // no range checking on from/to in the interest of speed static ArrayList byteArrayToList(byte[] a, int from, int to) { if (a == null) null; ArrayList l = new(to-from); for (int i = from; i < to; i++) l.add(a[i]); ret l; }