writeIntArray(List<int> a) { writeInt(a.length); for (int i = 0; i < a.length; i++) { writeInt(a[i]); } }