119 lines
3.4 KiB
Java
119 lines
3.4 KiB
Java
package com.google.android.gms.internal.measurement;
|
|
|
|
import java.io.IOException;
|
|
import java.io.Serializable;
|
|
import java.nio.charset.Charset;
|
|
import java.util.Comparator;
|
|
import java.util.Iterator;
|
|
import java.util.Locale;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class zzix implements Iterable<Byte>, Serializable {
|
|
private static final Comparator<zzix> zza;
|
|
public static final zzix zzb = new zziv(zzkf.zzd);
|
|
private static final zziw zzd;
|
|
private int zzc = 0;
|
|
|
|
static {
|
|
int i = zzij.zza;
|
|
zzd = new zziw(null);
|
|
zza = new zziq();
|
|
}
|
|
|
|
public static zzix zzl(byte[] bArr, int i, int i2) {
|
|
zzj(i, i + i2, bArr.length);
|
|
byte[] bArr2 = new byte[i2];
|
|
System.arraycopy(bArr, i, bArr2, 0, i2);
|
|
return new zziv(bArr2);
|
|
}
|
|
|
|
public static zzix zzm(String str) {
|
|
return new zziv(str.getBytes(zzkf.zzb));
|
|
}
|
|
|
|
public abstract boolean equals(Object obj);
|
|
|
|
public final int hashCode() {
|
|
int i = this.zzc;
|
|
if (i == 0) {
|
|
int zzd2 = zzd();
|
|
i = zze(zzd2, 0, zzd2);
|
|
if (i == 0) {
|
|
i = 1;
|
|
}
|
|
this.zzc = i;
|
|
}
|
|
return i;
|
|
}
|
|
|
|
public final String toString() {
|
|
Locale locale = Locale.ROOT;
|
|
Object[] objArr = new Object[3];
|
|
objArr[0] = Integer.toHexString(System.identityHashCode(this));
|
|
objArr[1] = Integer.valueOf(zzd());
|
|
objArr[2] = zzd() <= 50 ? zzlz.zza(this) : zzlz.zza(zzf(0, 47)).concat("...");
|
|
return String.format(locale, "<ByteString@%s size=%d contents=\"%s\">", objArr);
|
|
}
|
|
|
|
public abstract byte zza(int i);
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public abstract byte zzb(int i);
|
|
|
|
public abstract int zzd();
|
|
|
|
protected abstract int zze(int i, int i2, int i3);
|
|
|
|
public abstract zzix zzf(int i, int i2);
|
|
|
|
protected abstract String zzg(Charset charset);
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public abstract void zzh(zzin zzinVar) throws IOException;
|
|
|
|
public abstract boolean zzi();
|
|
|
|
public final String zzn(Charset charset) {
|
|
return zzd() == 0 ? "" : zzg(charset);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static int zzj(int i, int i2, int i3) {
|
|
int i4 = i2 - i;
|
|
if ((i | i2 | i4 | (i3 - i2)) >= 0) {
|
|
return i4;
|
|
}
|
|
if (i < 0) {
|
|
StringBuilder sb = new StringBuilder(32);
|
|
sb.append("Beginning index: ");
|
|
sb.append(i);
|
|
sb.append(" < 0");
|
|
throw new IndexOutOfBoundsException(sb.toString());
|
|
}
|
|
if (i2 < i) {
|
|
StringBuilder sb2 = new StringBuilder(66);
|
|
sb2.append("Beginning index larger than ending index: ");
|
|
sb2.append(i);
|
|
sb2.append(", ");
|
|
sb2.append(i2);
|
|
throw new IndexOutOfBoundsException(sb2.toString());
|
|
}
|
|
StringBuilder sb3 = new StringBuilder(37);
|
|
sb3.append("End index: ");
|
|
sb3.append(i2);
|
|
sb3.append(" >= ");
|
|
sb3.append(i3);
|
|
throw new IndexOutOfBoundsException(sb3.toString());
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
public final int zzk() {
|
|
return this.zzc;
|
|
}
|
|
|
|
@Override // java.lang.Iterable
|
|
public final /* synthetic */ Iterator<Byte> iterator() {
|
|
return new zzio(this);
|
|
}
|
|
}
|