/* * Decompiled with CFR 0.152. */ package com.ice.tar; import com.ice.tar.TarEntry; import com.ice.tar.TarInputStream; import java.io.IOException; import java.util.Enumeration; import java.util.NoSuchElementException; /* * Illegal identifiers - consider using --renameillegalidents true */ public class TarEntryEnumerator implements Enumeration { private TarInputStream tis; private boolean eof; private TarEntry readAhead; public Object nextElement() throws NoSuchElementException { if (this.eof && this.readAhead == null) { throw new NoSuchElementException(); } TarEntry tarEntry = null; if (this.readAhead != null) { tarEntry = this.readAhead; this.readAhead = null; } else { tarEntry = this.getNext(); } return tarEntry; } public boolean hasMoreElements() { if (this.eof) { return false; } boolean bl = false; this.readAhead = this.getNext(); if (this.readAhead != null) { bl = true; } return bl; } private final TarEntry getNext() { TarEntry tarEntry = null; try { tarEntry = this.tis.getNextEntry(); } catch (IOException iOException) { iOException.printStackTrace(); } if (tarEntry == null) { this.eof = true; } return tarEntry; } private final /* synthetic */ void this() { this.tis = null; this.eof = false; this.readAhead = null; } public TarEntryEnumerator(TarInputStream tarInputStream) { this.this(); this.tis = tarInputStream; this.eof = false; } }