Package org.eclipse.sisu.space
Class ZipEntryIterator
- java.lang.Object
-
- org.eclipse.sisu.space.ZipEntryIterator
-
- All Implemented Interfaces:
java.util.Iterator<java.lang.String>
final class ZipEntryIterator extends java.lang.Object implements java.util.Iterator<java.lang.String>Iteratorthat iterates over named entries inside JAR or ZIP resources.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]entryNamesprivate intindex
-
Constructor Summary
Constructors Constructor Description ZipEntryIterator(java.net.URL url)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String[]getEntryNames(java.util.zip.ZipFile zipFile)Returns a string array listing the entries in the given zip file.private static java.lang.String[]getEntryNames(java.util.zip.ZipInputStream zipStream)Returns a string array listing the entries in the given zip stream.booleanhasNext()java.lang.Stringnext()voidremove()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<java.lang.String>
-
next
public java.lang.String next()
- Specified by:
nextin interfacejava.util.Iterator<java.lang.String>
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<java.lang.String>
-
getEntryNames
private static java.lang.String[] getEntryNames(java.util.zip.ZipFile zipFile) throws java.io.IOExceptionReturns a string array listing the entries in the given zip file.- Parameters:
zipFile- The zip file- Returns:
- Array of entry names
- Throws:
java.io.IOException
-
getEntryNames
private static java.lang.String[] getEntryNames(java.util.zip.ZipInputStream zipStream) throws java.io.IOExceptionReturns a string array listing the entries in the given zip stream.- Parameters:
zipStream- The zip stream- Returns:
- Array of entry names
- Throws:
java.io.IOException
-
-