Files
rr3-apk/decompiled/sources/com/google/android/gms/internal/ads/zzgac.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

75 lines
2.2 KiB
Java

package com.google.android.gms.internal.ads;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
/* loaded from: classes3.dex */
final class zzgac extends FilterInputStream {
private long zza;
private long zzb;
public zzgac(InputStream inputStream, long j) {
super(inputStream);
this.zzb = -1L;
inputStream.getClass();
zzfun.zzf(j >= 0, "limit must be non-negative");
this.zza = j;
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final int available() throws IOException {
return (int) Math.min(((FilterInputStream) this).in.available(), this.zza);
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final synchronized void mark(int i) {
((FilterInputStream) this).in.mark(i);
this.zzb = this.zza;
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final int read() throws IOException {
if (this.zza == 0) {
return -1;
}
int read = ((FilterInputStream) this).in.read();
if (read != -1) {
this.zza--;
}
return read;
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final synchronized void reset() throws IOException {
if (!((FilterInputStream) this).in.markSupported()) {
throw new IOException("Mark not supported");
}
if (this.zzb == -1) {
throw new IOException("Mark not set");
}
((FilterInputStream) this).in.reset();
this.zza = this.zzb;
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final long skip(long j) throws IOException {
long skip = ((FilterInputStream) this).in.skip(Math.min(j, this.zza));
this.zza -= skip;
return skip;
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final int read(byte[] bArr, int i, int i2) throws IOException {
long j = this.zza;
if (j == 0) {
return -1;
}
int read = ((FilterInputStream) this).in.read(bArr, i, (int) Math.min(i2, j));
if (read != -1) {
this.zza -= read;
}
return read;
}
}