public HFileInfo append(final byte[] k, final byte[] v, final boolean checkPrefix)
    throws IOException {
    Objects.requireNonNull(k, "key cannot be null");
    Objects.requireNonNull(v, "value cannot be null");

    if (checkPrefix && isReservedFileInfoKey(k)) {
      throw new IOException("Keys with a " + HFileInfo.RESERVED_PREFIX + " are reserved");
    }
    put(k, v);
    return this;
  }
Append the given key/value pair to the file info, optionally checking the key prefix.
@param k           key to add
@param v           value to add
@param checkPrefix whether to check that the provided key does not start with the reserved
                   prefix
@return this file info object
@throws IOException          if the key or value is invalid
@throws NullPointerException if {@code key} or {@code value} is {@code null}
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileInfo.java