
com.cloudconvert.processor.response.successful.NoContentResponseProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudconvert-java Show documentation
Show all versions of cloudconvert-java Show documentation
CloudConvert is an online file converter API - more than 200 different audio, video, document, ebook, archive, image, spreadsheet and presentation formats supported.
package com.cloudconvert.processor.response.successful;
import com.cloudconvert.dto.result.Result;
import com.cloudconvert.processor.response.ResponseProcessor;
import com.fasterxml.jackson.core.type.TypeReference;
import org.apache.http.Header;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.stream.Collectors;
public class NoContentResponseProcessor implements ResponseProcessor {
@Override
public Result process(
final int status, final Header[] headers, final InputStream inputStream, final TypeReference typeReference
) throws IOException {
return Result.builder().headers(Arrays.stream(headers).collect(Collectors.toMap(Header::getName, Header::getValue)))
.message("").status(status).build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy