discord-jadx/app/src/main/java/f0/z.java

52 lines
1.3 KiB
Java
Raw Normal View History

2021-11-08 18:25:28 +00:00
package f0;
2021-06-27 20:44:35 +00:00
2021-11-08 18:25:28 +00:00
import d0.z.d.m;
import g0.n;
import g0.y;
2021-08-24 17:45:16 +00:00
import java.io.File;
import java.io.FileInputStream;
import okhttp3.MediaType;
2021-06-27 20:44:35 +00:00
import okhttp3.RequestBody;
2021-08-24 17:45:16 +00:00
import okio.BufferedSink;
/* compiled from: RequestBody.kt */
2022-03-02 20:59:20 +00:00
/* loaded from: classes3.dex */
2021-08-24 17:45:16 +00:00
public final class z extends RequestBody {
public final /* synthetic */ File a;
2021-12-21 23:37:30 +00:00
/* renamed from: b reason: collision with root package name */
2022-03-30 16:43:10 +00:00
public final /* synthetic */ MediaType f3674b;
2021-08-24 17:45:16 +00:00
public z(File file, MediaType mediaType) {
this.a = file;
2022-03-30 16:43:10 +00:00
this.f3674b = mediaType;
2021-06-27 20:44:35 +00:00
}
2021-08-24 17:45:16 +00:00
@Override // okhttp3.RequestBody
public long contentLength() {
return this.a.length();
2021-06-27 20:44:35 +00:00
}
2021-08-24 17:45:16 +00:00
@Override // okhttp3.RequestBody
public MediaType contentType() {
2022-03-30 16:43:10 +00:00
return this.f3674b;
2021-06-27 20:44:35 +00:00
}
2021-08-24 17:45:16 +00:00
@Override // okhttp3.RequestBody
public void writeTo(BufferedSink bufferedSink) {
m.checkParameterIsNotNull(bufferedSink, "sink");
File file = this.a;
m.checkParameterIsNotNull(file, "$this$source");
FileInputStream fileInputStream = new FileInputStream(file);
m.checkParameterIsNotNull(fileInputStream, "$this$source");
2022-03-02 20:59:20 +00:00
th = null;
try {
bufferedSink.P(new n(fileInputStream, new y()));
} finally {
try {
throw th;
} finally {
}
}
2021-06-27 20:44:35 +00:00
}
}