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

55 lines
1.6 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.y.b;
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 */
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-02-14 21:43:51 +00:00
public final /* synthetic */ MediaType f3670b;
2021-08-24 17:45:16 +00:00
public z(File file, MediaType mediaType) {
this.a = file;
2022-02-14 21:43:51 +00:00
this.f3670b = 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-02-14 21:43:51 +00:00
return this.f3670b;
2021-06-27 20:44:35 +00:00
}
2021-08-24 17:45:16 +00:00
/* JADX WARNING: Code restructure failed: missing block: B:10:0x002c, code lost:
throw r1;
*/
/* JADX WARNING: Code restructure failed: missing block: B:8:0x0028, code lost:
r1 = move-exception;
*/
/* JADX WARNING: Code restructure failed: missing block: B:9:0x0029, code lost:
2021-11-08 18:25:28 +00:00
d0.y.b.closeFinally(r0, r4);
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");
n nVar = new n(fileInputStream, new y());
2021-11-08 18:25:28 +00:00
bufferedSink.P(nVar);
2021-08-24 17:45:16 +00:00
b.closeFinally(nVar, null);
2021-06-27 20:44:35 +00:00
}
}