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

io.github.jpmorganchase.fusion.http.HttpConnectionInputStream Maven / Gradle / Ivy

There is a newer version: 0.0.14
Show newest version
package io.github.jpmorganchase.fusion.http;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;

final class HttpConnectionInputStream extends InputStream {

    private final HttpURLConnection connection;

    public HttpConnectionInputStream(HttpURLConnection connection) {
        this.connection = connection;
    }

    @Override
    public int read() throws IOException {
        return connection.getInputStream().read();
    }

    @Override
    public void close() throws IOException {
        connection.getInputStream().close();
        connection.disconnect();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy