jimu-decompiled/sources/okhttp3/internal/http/RealResponseBody.java
2025-05-13 19:24:51 +02:00

38 lines
978 B
Java

package okhttp3.internal.http;
import okhttp3.MediaType;
import okhttp3.ResponseBody;
import okio.BufferedSource;
/* loaded from: classes2.dex */
public final class RealResponseBody extends ResponseBody {
private final long contentLength;
private final String contentTypeString;
private final BufferedSource source;
public RealResponseBody(String str, long j, BufferedSource bufferedSource) {
this.contentTypeString = str;
this.contentLength = j;
this.source = bufferedSource;
}
@Override // okhttp3.ResponseBody
public long contentLength() {
return this.contentLength;
}
@Override // okhttp3.ResponseBody
public MediaType contentType() {
String str = this.contentTypeString;
if (str != null) {
return MediaType.parse(str);
}
return null;
}
@Override // okhttp3.ResponseBody
public BufferedSource source() {
return this.source;
}
}