package com.google.android.gms.common.data; import com.google.android.gms.common.annotation.KeepForSdk; import com.google.android.gms.common.internal.Preconditions; import java.util.Iterator; import java.util.NoSuchElementException; @KeepForSdk /* loaded from: classes.dex */ public class DataBufferIterator implements Iterator { protected final DataBuffer zaa; protected int zab = -1; public DataBufferIterator(DataBuffer dataBuffer) { this.zaa = (DataBuffer) Preconditions.checkNotNull(dataBuffer); } @Override // java.util.Iterator public final boolean hasNext() { return this.zab < this.zaa.getCount() + (-1); } @Override // java.util.Iterator public Object next() { if (hasNext()) { DataBuffer dataBuffer = this.zaa; int i10 = this.zab + 1; this.zab = i10; return dataBuffer.get(i10); } throw new NoSuchElementException("Cannot advance the iterator beyond " + this.zab); } @Override // java.util.Iterator public final void remove() { throw new UnsupportedOperationException("Cannot remove elements from a DataBufferIterator"); } }