static IntBuffer charArrayIndicesOf(char[] a, char [] b) { int i = -1; new IntBuffer out; while ((i = charArrayIndexOf(a, b, i+1)) >= 0) out.add(i); ret out; }