void saveHeader(final boolean sync) {
        int oldPos = this.buffer.position();
        try {
            BufferUtils.position(this.buffer, 0);
            final ByteBuffer headerBuf = this.header.encode();
            assert (headerBuf.remaining() == HEADER_SIZE);
            this.buffer.put(headerBuf);
            if (sync) {
                fsync(this.buffer);
            }
        } finally {
            BufferUtils.position(this.buffer, oldPos);
        }
    }
Clear data in [startPos, startPos+64).

@param startPos the start position(inclusive)
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/SegmentFile.java