public void saveHeader() {
        // save header to mappedByteBuffer
        final ByteBuffer header = this.header.encode();
        final ByteBuffer byteBuffer = sliceByteBuffer();
        byteBuffer.position(0);
        byteBuffer.put(header);
    }
Save file header
Dont need to flush , header will be flushed by flushService
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/file/AbstractFile.java