132 lines
3.8 KiB
Java
132 lines
3.8 KiB
Java
package com.google.android.gms.internal.vision;
|
|
|
|
import com.google.common.primitives.UnsignedBytes;
|
|
import java.io.IOException;
|
|
import java.io.Serializable;
|
|
import java.nio.charset.Charset;
|
|
import java.util.Comparator;
|
|
import java.util.Iterator;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public abstract class zzeo implements Serializable, Iterable<Byte> {
|
|
public static final zzeo zzrx = new zzex(zzga.zzxn);
|
|
private static final zzet zzry;
|
|
private static final Comparator<zzeo> zzrz;
|
|
private int zzlv = 0;
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static int zza(byte b) {
|
|
return b & UnsignedBytes.MAX_VALUE;
|
|
}
|
|
|
|
public abstract boolean equals(Object obj);
|
|
|
|
public abstract int size();
|
|
|
|
protected abstract int zza(int i, int i2, int i3);
|
|
|
|
protected abstract String zza(Charset charset);
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public abstract void zza(zzen zzenVar) throws IOException;
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
public abstract void zza(byte[] bArr, int i, int i2, int i3);
|
|
|
|
public abstract byte zzai(int i);
|
|
|
|
public abstract zzeo zzc(int i, int i2);
|
|
|
|
public abstract boolean zzdl();
|
|
|
|
public static zzeo zzb(byte[] bArr, int i, int i2) {
|
|
zzb(i, i + i2, bArr.length);
|
|
return new zzex(zzry.zzd(bArr, i, i2));
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static zzeo zze(byte[] bArr) {
|
|
return new zzex(bArr);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static zzeo zzc(byte[] bArr, int i, int i2) {
|
|
return new zzes(bArr, i, i2);
|
|
}
|
|
|
|
public static zzeo zzl(String str) {
|
|
return new zzex(str.getBytes(zzga.UTF_8));
|
|
}
|
|
|
|
public final String zzdk() {
|
|
return size() == 0 ? "" : zza(zzga.UTF_8);
|
|
}
|
|
|
|
public final int hashCode() {
|
|
int i = this.zzlv;
|
|
if (i == 0) {
|
|
int size = size();
|
|
i = zza(size, 0, size);
|
|
if (i == 0) {
|
|
i = 1;
|
|
}
|
|
this.zzlv = i;
|
|
}
|
|
return i;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static zzev zzaj(int i) {
|
|
return new zzev(i, null);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static int zzb(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());
|
|
}
|
|
|
|
public final String toString() {
|
|
return String.format("<ByteString@%s size=%d>", Integer.toHexString(System.identityHashCode(this)), Integer.valueOf(size()));
|
|
}
|
|
|
|
@Override // java.lang.Iterable
|
|
public /* synthetic */ Iterator<Byte> iterator() {
|
|
return new zzep(this);
|
|
}
|
|
|
|
static {
|
|
zzep zzepVar = null;
|
|
zzry = zzeg.zzck() ? new zzey(zzepVar) : new zzer(zzepVar);
|
|
zzrz = new zzeq();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
public final int zzdm() {
|
|
return this.zzlv;
|
|
}
|
|
}
|