Copies the contents of a into b. Does ignore the writer index of b.
a
b
static void copyTo(ByteBuf a, ByteBuf b) { for (int i = 0; i < a.capacity(); i++) { b[i] = a[i]; } }