|
Apache Tomcat 7.0.25 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Jar
Provides an abstraction for use by the various classes that need to scan
JARs. The classes provided by the JRE for accessing JARs (JarFile
and
JarInputStream
) have significantly different performance
characteristics depending on the form of the URL used to access the JAR.
For file based JAR URL
s, JarFile
is faster but for non-file
based URL
s, JarFile
creates a copy of the JAR in the
temporary directory so JarInputStream
is faster.
Method Summary | |
---|---|
void |
close()
Close any resources associated with this JAR. |
boolean |
entryExists(java.lang.String name)
Determines if a specific entry exists within the JAR. |
java.io.InputStream |
getEntryInputStream()
Obtains the input stream for the current entry. |
java.lang.String |
getEntryName()
Obtains the name of the current entry. |
java.io.InputStream |
getInputStream(java.lang.String name)
Obtain an InputStream for a given entry in a JAR. |
void |
nextEntry()
Moves the internal pointer to the next entry in the JAR. |
void |
reset()
Resets the internal pointer used to track JAR entries to the beginning of the JAR. |
Method Detail |
---|
boolean entryExists(java.lang.String name) throws java.io.IOException
name
- Entry to look for
true
if the specified entry exists else
false
java.io.IOException
java.io.InputStream getInputStream(java.lang.String name) throws java.io.IOException
InputStream
for a given entry in a JAR. The caller is
responsible for closing the stream.
name
- Entry to obtain an InputStream
for
InputStream
for the specified entry or null if
the entry does not exist
java.io.IOException
void close()
void nextEntry()
java.lang.String getEntryName()
java.io.InputStream getEntryInputStream() throws java.io.IOException
java.io.IOException
- If the stream cannot be obtainedvoid reset() throws java.io.IOException
java.io.IOException
- If the pointer cannot be reset
|
Apache Tomcat 7.0.25 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |