private void checkReadBytes(BufferedIndexInput input, int size, int pos) throws IOException {
   // Just to see that "offset" is treated properly in readBytes(), we
   // add an arbitrary offset at the beginning of the array
   int offset = size % 10; // arbitrary
   byte[] b = new byte[offset + size];
   input.readBytes(b, offset, size);
   for (int i = 0; i < size; i++) {
     assertEquals(b[offset + i], byten(pos + i));
   }
 }
 @Override
 protected void newBuffer(byte[] newBuffer) {
   super.newBuffer(newBuffer);
   byteBuf = ByteBuffer.wrap(newBuffer);
 }