- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
32 lines
780 B
Java
32 lines
780 B
Java
package com.google.firebase.encoders.proto;
|
|
|
|
import java.io.OutputStream;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class LengthCountingOutputStream extends OutputStream {
|
|
public long length = 0;
|
|
|
|
public long getLength() {
|
|
return this.length;
|
|
}
|
|
|
|
@Override // java.io.OutputStream
|
|
public void write(int i) {
|
|
this.length++;
|
|
}
|
|
|
|
@Override // java.io.OutputStream
|
|
public void write(byte[] bArr) {
|
|
this.length += bArr.length;
|
|
}
|
|
|
|
@Override // java.io.OutputStream
|
|
public void write(byte[] bArr, int i, int i2) {
|
|
int i3;
|
|
if (i < 0 || i > bArr.length || i2 < 0 || (i3 = i + i2) > bArr.length || i3 < 0) {
|
|
throw new IndexOutOfBoundsException();
|
|
}
|
|
this.length += i2;
|
|
}
|
|
}
|