readTo static method

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

Reads the contents of a into b using ByteBuf.readByte of a. Does ignore the writer index of b.

Implementation

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