protected final void writeFileInfo(FixedFileTrailer trailer, DataOutputStream out)
    throws IOException {
    trailer.setFileInfoOffset(outputStream.getPos());
    finishFileInfo();
    long startTime = EnvironmentEdgeManager.currentTime();
    fileInfo.write(out);
    HFile.updateWriteLatency(EnvironmentEdgeManager.currentTime() - startTime);
  }
Sets the file info offset in the trailer, finishes up populating fields in the file info, and
writes the file info into the given data output. The reason the data output is not always
{@link #outputStream} is that we store file info as a block in version 2.
@param trailer fixed file trailer
@param out     the data output to write the file info to
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java