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

com.undefinedlabs.scope.deps.okio.ForwardingSource Maven / Gradle / Ivy

Go to download

Scope is a APM for tests to give engineering teams unprecedented visibility into their CI process to quickly identify, troubleshoot and fix failed builds. This artifact contains dependencies for Scope.

There is a newer version: 0.14.0-beta.2
Show newest version
package com.undefinedlabs.scope.deps.okio;

import java.io.IOException;

public abstract class ForwardingSource implements Source {
    private final Source delegate;

    public ForwardingSource(Source delegate) {
        if (delegate == null) throw new IllegalArgumentException("delegate == null");
        this.delegate = delegate;
    }

    /** {@link Source} to which this instance is delegating. */
    public final Source delegate() {
        return delegate;
    }

    @Override public long read(Buffer sink, long byteCount) throws IOException {
        return delegate.read(sink, byteCount);
    }

    @Override public Timeout timeout() {
        return delegate.timeout();
    }

    @Override public void close() throws IOException {
        delegate.close();
    }

    @Override public String toString() {
        return getClass().getSimpleName() + "(" + delegate.toString() + ")";
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy