Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.optional.depend

public Class JarFileIterator

extends Object
implements ClassFileIterator
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.optional.depend.ClassFileIterator, java.lang.Iterable
Imports
java.io.IOException, .InputStream, java.util.zip.ZipEntry, .ZipInputStream, org.apache.tools.ant.BuildException

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

Field Summary

Modifier and TypeField and Description
private ZipInputStream
jarStream

The jar stream from the jar file being iterated over

Constructor Summary

AccessConstructor and Description
public
JarFileIterator(InputStream
the basic input stream from which the Jar is received
stream
)

Construct an iterator over a jar stream

Method Summary

Modifier and TypeMethod and Description
public ClassFile

Returns:

a ClassFile object describing the class from the jar
getNextClassFile
()

Implements org.apache.tools.ant.taskdefs.optional.depend.ClassFileIterator.getNextClassFile.

Get the next ClassFile object from the jar
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

jarStreamback to summary
private ZipInputStream jarStream

The jar stream from the jar file being iterated over

Constructor Detail

JarFileIteratorback to summary
public JarFileIterator(InputStream stream) throws IOException

Construct an iterator over a jar stream

Parameters
stream:InputStream

the basic input stream from which the Jar is received

Exceptions
IOException:
if the jar stream cannot be created

Method Detail

getNextClassFileback to summary
public ClassFile getNextClassFile()

Implements org.apache.tools.ant.taskdefs.optional.depend.ClassFileIterator.getNextClassFile.

Get the next ClassFile object from the jar

Returns:ClassFile

a ClassFile object describing the class from the jar

Annotations
@Override