public ByteBuffer getReadOnlyData() {
        return this.data != null ? this.data.asReadOnlyBuffer() : null;
    }
Creates a new, read-only byte buffer that shares this log entry's data buffer's content.

@return the new, read-only byte buffer
jraft-core/src/main/java/com/alipay/sofa/jraft/entity/LogEntry.java