|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.vfs.Jar
public class Jar
Jar is a cache around a jar file to avoid scanning through the whole file on each request.
When the Jar is created, it scans the file and builds a directory of the Jar entries.
| Method Summary | |
|---|---|
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()
|
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. |
PersistentDependency |
getDepend()
Returns the dependency. |
long |
getLastModified(java.lang.String path)
Returns the length 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 true if the entry is a file in the 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. |
StreamImpl |
openReadImpl(Path path)
Opens a stream to an entry in the jar. |
void |
removeEvent()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static PersistentDependency createDepend(Path backing)
public static PersistentDependency createDepend(Path backing,
long digest)
public PersistentDependency getDepend()
public java.util.jar.Manifest getManifest()
throws java.io.IOException
path - the path name inside the jar.
java.io.IOExceptionpublic 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 entry
public long getLength(java.lang.String path)
path - full path to the jar entry
public 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 StreamImpl openReadImpl(Path path)
throws java.io.IOException
path - relative path into the jar.
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void clearCache()
public void close()
public void removeEvent()
removeEvent in interface CacheListenerpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic static void clearJarCache()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||