class DefaultImportExportService implements ImportExportService {

    private WebClient client;

    private final FileManager fileManager;

    public DefaultImportExportService(WebClient.Builder builder,
                                      FileManager fileManager) {
        client = builder.build();
        this.fileManager = fileManager;
    }

    public <T> Flux<RowResult<T>> doImport(Class<T> clazz, String fileUrl) {
        return getInputStream(fileUrl)
            .flatMapMany(inputStream -> ExcelReadDataListener.of(inputStream, clazz));
    }

    @Override
    public <T> Flux<RowResult<T>> doImport(Class<T> clazz, InputStream stream) {
        return ExcelReadDataListener.of(stream, clazz);
    }


    @Override
    public <T> Flux<T> readData(String fileUrl, String fileId, RowWrapper<T> wrapper) {
        if (!StringUtils.isNullOrEmpty(fileUrl)) {
            return getInputStream(fileUrl)
                .flatMapMany(inputStream -> read(inputStream, FileUtils.getExtension(fileUrl), wrapper));
        } else {

            return Mono
                .zip(fileManager
                         .read(fileId)
                         .as(DataBufferUtils::join)
                         .map(DataBuffer::asInputStream),
                     fileManager.getFile(fileId))
                .flatMapMany(t2 -> read(t2.getT1(), t2.getT2().getExtension(), wrapper));
        }
    }

    public Mono<InputStream> getInputStream(String fileUrl) {<FILL_FUNCTION_BODY>}
}


        return Mono.defer(() -> {
            if (fileUrl.startsWith("http")) {
                return client
                    .get()
                    .uri(fileUrl)
                    .accept(MediaType.APPLICATION_OCTET_STREAM)
                    .exchangeToMono(clientResponse -> clientResponse.bodyToMono(Resource.class))
                    .flatMap(resource -> Mono.fromCallable(resource::getInputStream));
            } else {
                return Mono.fromCallable(() -> new FileInputStream(fileUrl));
            }
        });

    
<no_super_class>