public class Jar extends java.lang.Object implements CacheListener
When the Jar is created, it scans the file and builds a directory of the Jar entries.
Modifier and Type | Class and Description |
---|---|
class |
Jar.ZipStreamImpl
StreamImpl to read from a ZIP file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(java.lang.String path)
Readable if the jar is readable and the path refers to a file.
|
boolean |
canWrite(java.lang.String path)
Can't write to jars.
|
void |
clearCache()
Clears any cached JarFile.
|
static void |
clearJarCache()
Clears all the cached files in the jar.
|
void |
close() |
void |
closeZipFile(java.util.zip.ZipFile zipFile) |
static PersistentDependency |
createDepend(Path backing)
Return a Jar for the path.
|
static PersistentDependency |
createDepend(Path backing,
long digest)
Return a Jar for the path.
|
boolean |
equals(java.lang.Object o) |
boolean |
exists(java.lang.String path)
Returns true if the entry exists in the jar.
|
java.security.cert.Certificate[] |
getCertificates(java.lang.String path)
Returns any certificates.
|
int |
getChangeSequence() |
PersistentDependency |
getDepend()
Returns the dependency.
|
long |
getLastModified(java.lang.String path)
Returns the last-modified time of the entry in the jar file.
|
long |
getLength(java.lang.String path)
Returns the length of the entry in the jar file.
|
java.util.jar.Manifest |
getManifest()
Returns Manifest
|
java.util.zip.ZipEntry |
getZipEntry(java.lang.String path) |
java.util.zip.ZipFile |
getZipFile()
Returns the Java ZipFile for this Jar.
|
boolean |
isDirectory(java.lang.String path)
Returns true if the entry is a directory in the jar.
|
boolean |
isFile(java.lang.String path)
Returns true if the entry is a file in the jar.
|
java.lang.String[] |
list(java.lang.String path)
Lists all the files in this directory.
|
Jar.ZipStreamImpl |
openReadImpl(Path path)
Opens a stream to an entry in the jar.
|
Jar.ZipStreamImpl |
openReadImpl(java.lang.String pathName) |
void |
removeEvent() |
java.lang.String |
toString() |
public static PersistentDependency createDepend(Path backing)
public static PersistentDependency createDepend(Path backing, long digest)
public PersistentDependency getDepend()
public int getChangeSequence()
public java.util.jar.Manifest getManifest() throws java.io.IOException
java.io.IOException
public java.security.cert.Certificate[] getCertificates(java.lang.String path)
public boolean exists(java.lang.String path)
path
- the path name inside the jar.public boolean isDirectory(java.lang.String path)
path
- the path name inside the jar.public boolean isFile(java.lang.String path)
path
- the path name inside the jar.public long getLastModified(java.lang.String path)
path
- full path to the jar entrypublic long getLength(java.lang.String path)
path
- full path to the jar entrypublic boolean canRead(java.lang.String path)
public boolean canWrite(java.lang.String path)
public java.lang.String[] list(java.lang.String path) throws java.io.IOException
java.io.IOException
public Jar.ZipStreamImpl openReadImpl(Path path) throws java.io.IOException
path
- relative path into the jar.java.io.IOException
public Jar.ZipStreamImpl openReadImpl(java.lang.String pathName) throws java.io.IOException
java.io.IOException
public void clearCache()
public java.util.zip.ZipEntry getZipEntry(java.lang.String path) throws java.io.IOException
java.io.IOException
public java.util.zip.ZipFile getZipFile() throws java.io.IOException
java.io.IOException
public void closeZipFile(java.util.zip.ZipFile zipFile)
public void close()
public void removeEvent()
removeEvent
in interface CacheListener
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public static void clearJarCache()
public java.lang.String toString()
toString
in class java.lang.Object