All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.saoxuequ.http.request.light.reader.StringResponse Maven / Gradle / Ivy

package io.github.saoxuequ.http.request.light.reader;

import io.github.saoxuequ.http.request.common.Readable;
import org.apache.commons.io.IOUtils;

import java.io.IOException;
import java.io.InputStream;

public class StringResponse implements Readable {
    @Override
    public String read(InputStream inputStream) {
        try (InputStream is = inputStream) {
            return IOUtils.toString(is);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy