protected void finishBlockAndWriteHeaderAndData(DataOutputStream out) throws IOException {
      ensureBlockReady();
      long startTime = EnvironmentEdgeManager.currentTime();
      out.write(onDiskBlockBytesWithHeader.getBuffer(), 0, onDiskBlockBytesWithHeader.size());
      out.write(onDiskChecksum);
      HFile.updateWriteLatency(EnvironmentEdgeManager.currentTime() - startTime);
    }
Writes the header and the compressed data of this block (or uncompressed data when not using
compression) into the given stream. Can be called in the "writing" state or in the "block
ready" state. If called in the "writing" state, transitions the writer to the "block ready"
state.
@param out the output stream to write the
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java