public static byte getValueAsByte(Tag tag) {
    if (tag.hasArray()) {
      return tag.getValueArray()[tag.getValueOffset()];
    }
    return ByteBufferUtils.toByte(tag.getValueByteBuffer(), tag.getValueOffset());
  }
Converts the value bytes of the given tag into a byte value
@param tag The Tag
@return value as byte
hbase-common/src/main/java/org/apache/hadoop/hbase/Tag.java