svoid sortIntBuffer(IntBuffer buf, Comparator comparator) { if (buf == null) ret; Int[] a = intArrayToBoxed(buf.data, 0, buf.size); Arrays.sort(a, comparator); for i over a: buf.set(i, a[i]); }