code: public ByteBuffer readAll() throws IOException {
      ByteBuffer bb = ByteBuffer.allocate((int) length);
      if (positionalReadMode) {
        read(0, bb.array(), 0, (int) length);
        return bb;
      } else {
        read(bb.array(), 0, (int) length);
        return bb;
      }
    }
docs: Channel Transfer is not possible for inline checksum. To keep backward
  compatible, we call normal read() to return the same data.