35 lines
913 B
Java
35 lines
913 B
Java
package org.bouncycastle.asn1;
|
|
|
|
import java.io.IOException;
|
|
import java.util.Enumeration;
|
|
|
|
/* loaded from: classes6.dex */
|
|
class LazyConstructionEnumeration implements Enumeration {
|
|
private ASN1InputStream aIn;
|
|
private Object nextObj = readObject();
|
|
|
|
@Override // java.util.Enumeration
|
|
public Object nextElement() {
|
|
Object obj = this.nextObj;
|
|
this.nextObj = readObject();
|
|
return obj;
|
|
}
|
|
|
|
@Override // java.util.Enumeration
|
|
public boolean hasMoreElements() {
|
|
return this.nextObj != null;
|
|
}
|
|
|
|
private Object readObject() {
|
|
try {
|
|
return this.aIn.readObject();
|
|
} catch (IOException e) {
|
|
throw new ASN1ParsingException("malformed DER construction: ".concat(String.valueOf(e)), e);
|
|
}
|
|
}
|
|
|
|
public LazyConstructionEnumeration(byte[] bArr) {
|
|
this.aIn = new ASN1InputStream(bArr, true);
|
|
}
|
|
}
|