public ByteBuffer encode() {
        ByteBuffer buffer = ByteBuffer.allocate(HEADER_SIZE);
        buffer.put(MAGIC);
        buffer.put(MAGIC);
        buffer.putLong(this.FirstLogIndex);
        buffer.putLong(this.FileFromOffset);
        buffer.putLong(RESERVED_FLAG);
        buffer.flip();
        return buffer;
    }
File header:
<pre>
  magic bytes       first log index   file from offset       reserved
  [0x20 0x20]      [... 8 bytes...]   [... 8 bytes...]   [... 8 bytes...]
<pre>
@author hzh (642256541@qq.com)
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/file/FileHeader.java