Constructor and Description |
---|
UrlJar(java.net.URL url) |
Modifier and Type | Method and Description |
---|---|
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.
|
public UrlJar(java.net.URL url) throws java.io.IOException
java.io.IOException
public boolean entryExists(java.lang.String name) throws java.io.IOException
Jar
entryExists
in interface Jar
name
- Entry to look fortrue
if the specified entry exists else
false
java.io.IOException
public java.io.InputStream getInputStream(java.lang.String name) throws java.io.IOException
Jar
InputStream
for a given entry in a JAR. The caller is
responsible for closing the stream.getInputStream
in interface Jar
name
- Entry to obtain an InputStream
forInputStream
for the specified entry or null if
the entry does not existjava.io.IOException
public void close()
Jar
public void nextEntry()
Jar
public java.lang.String getEntryName()
Jar
getEntryName
in interface Jar
public java.io.InputStream getEntryInputStream() throws java.io.IOException
Jar
getEntryInputStream
in interface Jar
java.io.IOException
- If the stream cannot be obtainedCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.