## org.apache.tools.ant.taskdefs.optional.depend
Class JarFileIterator

    java.lang.Object
      org.apache.tools.ant.taskdefs.optional.depend.JarFileIterator

All Implemented Interfaces:
  ClassFileIterator

public class JarFileIterator
extends java.lang.Object
implements ClassFileIterator

A class file iterator which iterates through the contents of a Java jar file.

Author:
  Conor MacNeill

Constructor Summary
`JarFileIterator(java.io.InputStream stream)` Construct a iterartor over a jar stream

Method Summary
`ClassFile` `getNextClassFile()` Get the next ClassFile object from the jar

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JarFileIterator

    public JarFileIterator(java.io.InputStream stream)
                    throws java.io.IOException

  Construct a iterartor over a jar stream

Parameters:
  `stream` - the basic input stream from which the Jar is recived
Throws:
  `java.io.IOException` - if the jar stream connot be created

Method Detail

### getNextClassFile

    public ClassFile getNextClassFile()

  Get the next ClassFile object from the jar

  Specified by:
    `getNextClassFile` in interface `ClassFileIterator`
  Returns:
    a ClassFile object describing the class from the jar

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.