public boolean decode(final ByteBuffer buffer) {
        if (buffer == null || buffer.remaining() < HEADER_SIZE) {
            LOG.error("Fail to decode file header, invalid buffer length: {}", buffer == null ? 0 : buffer.remaining());
            return false;
        }
        if (buffer.get() != MAGIC) {
            return false;
        }
        if (buffer.get() != MAGIC) {
            return false;
        }
        this.FirstLogIndex = buffer.getLong();
        this.FileFromOffset = buffer.getLong();
        return true;
    }
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