- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
58 lines
1.3 KiB
Java
58 lines
1.3 KiB
Java
package okhttp3.internal.cache;
|
|
|
|
import java.io.IOException;
|
|
import okio.Buffer;
|
|
import okio.ForwardingSink;
|
|
import okio.Sink;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class FaultHidingSink extends ForwardingSink {
|
|
public boolean hasErrors;
|
|
|
|
public abstract void onException(IOException iOException);
|
|
|
|
public FaultHidingSink(Sink sink) {
|
|
super(sink);
|
|
}
|
|
|
|
@Override // okio.ForwardingSink, okio.Sink
|
|
public void write(Buffer buffer, long j) {
|
|
if (this.hasErrors) {
|
|
buffer.skip(j);
|
|
return;
|
|
}
|
|
try {
|
|
super.write(buffer, j);
|
|
} catch (IOException e) {
|
|
this.hasErrors = true;
|
|
onException(e);
|
|
}
|
|
}
|
|
|
|
@Override // okio.ForwardingSink, okio.Sink, java.io.Flushable
|
|
public void flush() {
|
|
if (this.hasErrors) {
|
|
return;
|
|
}
|
|
try {
|
|
super.flush();
|
|
} catch (IOException e) {
|
|
this.hasErrors = true;
|
|
onException(e);
|
|
}
|
|
}
|
|
|
|
@Override // okio.ForwardingSink, okio.Sink, java.io.Closeable, java.lang.AutoCloseable
|
|
public void close() {
|
|
if (this.hasErrors) {
|
|
return;
|
|
}
|
|
try {
|
|
super.close();
|
|
} catch (IOException e) {
|
|
this.hasErrors = true;
|
|
onException(e);
|
|
}
|
|
}
|
|
}
|