@Override
    public int doRead(ByteBuf dst, long position, int length) throws IOException {
        length = Math.min(length, dst.writableBytes());
        assert position + length <= capacity();
        int bytesRead = 0;
        while (dst.isWritable()) {
            int read = dst.writeBytes(fileChannel, position + bytesRead, length);
            if (read == -1) {
                // EOF
                break;
            }
            bytesRead += read;
        }
        return bytesRead;
    }
When set to true, the file should exist and the file size does not need to be verified.
s3stream/src/main/java/com/automq/stream/s3/wal/util/WALFileChannel.java