copyTo static method

void copyTo(
  1. ByteBuf a,
  2. ByteBuf b
)

Copies the contents of a into b. Does ignore the writer index of b.

Implementation

static void copyTo(ByteBuf a, ByteBuf b) {
  for (int i = 0; i < a.capacity(); i++) {
    b[i] = a[i];
  }
}