@Override
  public byte[] toBytes(int offset, int length) {
    checkRefCount();
    byte[] output = new byte[length];
    ByteBufferUtils.copyFromBufferToArray(output, buf, offset, 0, length);
    return output;
  }
An implementation of ByteBuff where a single BB backs the BBI. This just acts as a wrapper over a
normal BB - offheap or onheap
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/SingleByteBuff.java