public class JarAsDirectory
extends java.io.File
Modifier and Type | Field and Description |
---|---|
protected java.lang.Boolean |
dir |
protected java.io.File[] |
entries
The subentries contained in the entry.
|
protected java.util.zip.ZipEntry |
entry
The entry.
|
protected java.util.Map<java.lang.String,JarAsDirectory> |
entryfiles
The files for the entry paths (cached for easy access).
|
protected java.lang.String |
entrystr |
protected java.lang.String |
jarpath
The path of the jar file.
|
protected long |
lastmodified
The timestamp of the file.
|
protected boolean |
refresh
The refresh flag (normally only for root jar file but in remote case also for entries (partial jars).
|
Constructor and Description |
---|
JarAsDirectory(java.lang.String jarpath)
Create a directory representation of a jar file.
|
JarAsDirectory(java.lang.String jarpath,
java.lang.String entrystr,
boolean dir,
boolean refresh)
Create a directory representation of a jar file entry.
|
JarAsDirectory(java.lang.String jarpath,
java.util.zip.ZipEntry entry)
Create a directory representation of a jar file entry.
|
Modifier and Type | Method and Description |
---|---|
MultiCollection<java.lang.String,java.util.zip.ZipEntry> |
createEntries() |
java.io.File[] |
createFiles(java.lang.String key,
MultiCollection<java.lang.String,java.util.zip.ZipEntry> entries)
Create the files for an entry.
|
boolean |
exists()
Check if the file exists.
|
java.lang.String |
getAbsolutePath() |
java.util.Map<java.lang.String,JarAsDirectory> |
getEntryFiles()
Get the entryfiles.
|
java.lang.String |
getEntryName() |
java.io.File |
getFile(java.lang.String path)
Get a file for an entry path.
|
java.lang.String |
getJarPath()
Get the path to the jar file.
|
long |
getLastModified()
Get the lastmodified.
|
java.util.zip.ZipEntry |
getZipEntry()
Get the zip entry, if any (file pointer inside jar file).
|
boolean |
isDirectory() |
protected boolean |
isRefresh()
Test if jar should refresh its content.
|
boolean |
isRoot()
Test if this is the real jar (not a contained file).
|
long |
lastModified() |
java.io.File[] |
listFiles() |
java.io.File[] |
listFiles(java.io.FileFilter filter) |
java.io.File[] |
listFiles(java.io.FilenameFilter filter) |
boolean |
refresh()
Refresh the jar entries.
|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, getAbsoluteFile, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isFile, isHidden, length, list, list, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
protected java.lang.String jarpath
protected long lastmodified
protected java.util.zip.ZipEntry entry
protected java.lang.String entrystr
protected java.lang.Boolean dir
protected java.io.File[] entries
protected java.util.Map<java.lang.String,JarAsDirectory> entryfiles
protected boolean refresh
public JarAsDirectory(java.lang.String jarpath)
public JarAsDirectory(java.lang.String jarpath, java.lang.String entrystr, boolean dir, boolean refresh)
public JarAsDirectory(java.lang.String jarpath, java.util.zip.ZipEntry entry)
public boolean isDirectory()
isDirectory
in class java.io.File
public java.io.File[] listFiles(java.io.FileFilter filter)
listFiles
in class java.io.File
public java.io.File[] listFiles(java.io.FilenameFilter filter)
listFiles
in class java.io.File
public java.io.File[] listFiles()
listFiles
in class java.io.File
public java.lang.String getAbsolutePath()
getAbsolutePath
in class java.io.File
public long lastModified()
lastModified
in class java.io.File
public boolean refresh()
public MultiCollection<java.lang.String,java.util.zip.ZipEntry> createEntries()
public boolean exists()
exists
in class java.io.File
public java.io.File[] createFiles(java.lang.String key, MultiCollection<java.lang.String,java.util.zip.ZipEntry> entries)
public java.lang.String getJarPath()
public java.util.zip.ZipEntry getZipEntry()
public java.io.File getFile(java.lang.String path)
public java.util.Map<java.lang.String,JarAsDirectory> getEntryFiles()
public boolean isRoot()
public long getLastModified()
public java.lang.String getEntryName()
protected boolean isRefresh()