Class ZipEntryIterator

java.lang.Object
org.eclipse.sisu.space.ZipEntryIterator
All Implemented Interfaces:
Iterator<String>

final class ZipEntryIterator extends Object implements Iterator<String>
Iterator that iterates over named entries inside JAR or ZIP resources.
  • Field Details

    • entryNames

      private String[] entryNames
    • index

      private int index
  • Constructor Details

    • ZipEntryIterator

      ZipEntryIterator(URL url)
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<String>
    • next

      public String next()
      Specified by:
      next in interface Iterator<String>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<String>
    • getEntryNames

      private static String[] getEntryNames(ZipFile zipFile) throws IOException
      Returns a string array listing the entries in the given zip file.
      Parameters:
      zipFile - The zip file
      Returns:
      Array of entry names
      Throws:
      IOException
    • getEntryNames

      private static String[] getEntryNames(ZipInputStream zipStream) throws IOException
      Returns a string array listing the entries in the given zip stream.
      Parameters:
      zipStream - The zip stream
      Returns:
      Array of entry names
      Throws:
      IOException