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>
Iterator
that iterates over named entries inside JAR or ZIP resources.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]
entryNames
private int
index
-
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.boolean
hasNext()
java.lang.String
next()
void
remove()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<java.lang.String>
-
next
public java.lang.String next()
- Specified by:
next
in interfacejava.util.Iterator<java.lang.String>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<java.lang.String>
-
getEntryNames
private static java.lang.String[] getEntryNames(java.util.zip.ZipFile zipFile) throws java.io.IOException
Returns 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.IOException
Returns 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
-
-