@Override
  public int write(FileChannel channel, long offset) throws IOException {
    checkRefCount();
    int total = 0;
    while (buf.hasRemaining()) {
      int len = channel.write(buf, offset);
      total += len;
      offset += len;
    }
    return total;
  }
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