jimu-decompiled/sources/okio/ForwardingSink.java
2025-05-13 19:24:51 +02:00

44 lines
1.0 KiB
Java

package okio;
import java.io.IOException;
/* loaded from: classes2.dex */
public abstract class ForwardingSink implements Sink {
private final Sink delegate;
public ForwardingSink(Sink sink) {
if (sink == null) {
throw new IllegalArgumentException("delegate == null");
}
this.delegate = sink;
}
@Override // okio.Sink, java.io.Closeable, java.lang.AutoCloseable
public void close() throws IOException {
this.delegate.close();
}
public final Sink delegate() {
return this.delegate;
}
@Override // okio.Sink, java.io.Flushable
public void flush() throws IOException {
this.delegate.flush();
}
@Override // okio.Sink
public Timeout timeout() {
return this.delegate.timeout();
}
public String toString() {
return getClass().getSimpleName() + "(" + this.delegate.toString() + ")";
}
@Override // okio.Sink
public void write(Buffer buffer, long j) throws IOException {
this.delegate.write(buffer, j);
}
}