@Override
  public int available() {
    return this.buf.remaining();
  }
@return the number of remaining bytes that can be read (or skipped over) from this input
        stream.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBuffInputStream.java