ai.vespa.hosted.client.ForwardingInputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-client Show documentation
Show all versions of http-client Show documentation
HTTP client wrapper around an Apache http client 5
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.hosted.client;
import java.io.IOException;
import java.io.InputStream;
import static java.util.Objects.requireNonNull;
/**
* @author jonmv
*/
public class ForwardingInputStream extends InputStream {
private final InputStream delegate;
public ForwardingInputStream(InputStream delegate) {
this.delegate = requireNonNull(delegate);
}
@Override
public int read() throws IOException {
return delegate.read();
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
return delegate.read(b, off, len);
}
@Override
public int available() throws IOException {
return delegate.available();
}
@Override
public void close() throws IOException {
delegate.close();
}
@Override
public synchronized void mark(int readlimit) {
delegate.mark(readlimit);
}
@Override
public synchronized void reset() throws IOException {
delegate.reset();
}
@Override
public boolean markSupported() {
return delegate.markSupported();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy