void writeHeaderAndData(FSDataOutputStream out) throws IOException {
      long offset = out.getPos();
      if (startOffset != UNSET && offset != startOffset) {
        throw new IOException("A " + blockType + " block written to a "
          + "stream twice, first at offset " + startOffset + ", then at " + offset);
      }
      startOffset = offset;
      finishBlockAndWriteHeaderAndData(out);
    }
Similar to {@link #writeHeaderAndData(FSDataOutputStream)}, but records the offset of this
block so that it can be referenced in the next block of the same type.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java