public boolean reachesFileEndBy(final long waitToWroteBytes) {
        this.readLock.lock();
        try {
            return this.wrotePos + waitToWroteBytes > this.size;
        } finally {
            this.readLock.unlock();
        }
    }
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