static String toStringHeader(ByteBuff buf) throws IOException {
    byte[] magicBuf = new byte[Math.min(buf.limit() - buf.position(), BlockType.MAGIC_LENGTH)];
    buf.get(magicBuf);
    BlockType bt = BlockType.parse(magicBuf, 0, BlockType.MAGIC_LENGTH);
    int compressedBlockSizeNoHeader = buf.getInt();
    int uncompressedBlockSizeNoHeader = buf.getInt();
    long prevBlockOffset = buf.getLong();
    byte cksumtype = buf.get();
    long bytesPerChecksum = buf.getInt();
    long onDiskDataSizeWithHeader = buf.getInt();
    return " Header dump: magic: " + Bytes.toString(magicBuf) + " blockType " + bt
      + " compressedBlockSizeNoHeader " + compressedBlockSizeNoHeader
      + " uncompressedBlockSizeNoHeader " + uncompressedBlockSizeNoHeader + " prevBlockOffset "
      + prevBlockOffset + " checksumType " + ChecksumType.codeToType(cksumtype)
      + " bytesPerChecksum " + bytesPerChecksum + " onDiskDataSizeWithHeader "
      + onDiskDataSizeWithHeader;
  }
Convert the contents of the block header into a human readable string. This is mostly helpful
for debugging. This assumes that the block has minor version > 0.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java