|
JBoss VFS 3.0.1.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.vfs.spi.JavaZipFileSystem
public final class JavaZipFileSystem
This implementation is backed by a zip file. The provided file must be owned by this instance; otherwise, if the file disappears unexpectedly, the filesystem will malfunction.
Constructor Summary | |
---|---|
JavaZipFileSystem(File archiveFile,
TempDir tempDir)
Create a new instance. |
|
JavaZipFileSystem(String name,
InputStream inputStream,
TempDir tempDir)
Create a new instance. |
Method Summary | |
---|---|
void |
close()
Destroy this filesystem instance. |
boolean |
delete(VirtualFile mountPoint,
VirtualFile target)
Attempt to delete a virtual file within this filesystem. |
boolean |
exists(VirtualFile mountPoint,
VirtualFile target)
Ascertain the existance of a virtual file within this filesystem. |
CodeSigner[] |
getCodeSigners(VirtualFile mountPoint,
VirtualFile target)
Get the CodeSigner s for a the virtual file. |
List<String> |
getDirectoryEntries(VirtualFile mountPoint,
VirtualFile target)
Read a directory. |
File |
getFile(VirtualFile mountPoint,
VirtualFile target)
Get a real File for the given path within this filesystem. |
long |
getLastModified(VirtualFile mountPoint,
VirtualFile target)
Get the last modification time of a virtual file within this filesystem. |
File |
getMountSource()
Get the File source provided at mount time. |
long |
getSize(VirtualFile mountPoint,
VirtualFile target)
Get the size of a virtual file within this filesystem. |
boolean |
isDirectory(VirtualFile mountPoint,
VirtualFile target)
Ascertain whether a virtual file within this filesystem is a directory. |
boolean |
isFile(VirtualFile mountPoint,
VirtualFile target)
Ascertain whether a virtual file within this filesystem is a plain file. |
boolean |
isReadOnly()
Determine whether this filesystem is read-only. |
InputStream |
openInputStream(VirtualFile mountPoint,
VirtualFile target)
Open an input stream for the file at the given relative path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaZipFileSystem(String name, InputStream inputStream, TempDir tempDir) throws IOException
name
- the name of the source archiveinputStream
- an input stream from the source archivetempDir
- the temp dir into which zip information is stored
IOException
- if an I/O error occurspublic JavaZipFileSystem(File archiveFile, TempDir tempDir) throws IOException
archiveFile
- the original archive filetempDir
- the temp dir into which zip information is stored
IOException
- if an I/O error occursMethod Detail |
---|
public File getFile(VirtualFile mountPoint, VirtualFile target) throws IOException
File
for the given path within this filesystem. Some filesystem types will need to make a copy
in order to return this file; such copies should be cached and retained until the filesystem is closed. Depending
on the file type, the real path of the returned File
may or may not bear a relationship to the virtual
path provided; if such a relationship is required, it must be negotiated at the time the filesystem is mounted.
getFile
in interface FileSystem
mountPoint
- the mount point of the filesystem instance (guaranteed to be a parent of target
)target
- the virtual file to act upon
IOException
- if an I/O error occurspublic InputStream openInputStream(VirtualFile mountPoint, VirtualFile target) throws IOException
openInputStream
in interface FileSystem
mountPoint
- the mount point of the filesystem instance (guaranteed to be a parent of target
)target
- the virtual file to act upon
IOException
- if an I/O error occurspublic boolean delete(VirtualFile mountPoint, VirtualFile target)
delete
in interface FileSystem
mountPoint
- the mount point of the filesystem instance (guaranteed to be a parent of target
)target
- the virtual file to act upon
true
if the file was deleted, false
if it failed for any reasonpublic long getSize(VirtualFile mountPoint, VirtualFile target)
getSize
in interface FileSystem
mountPoint
- the mount point of the filesystem instance (guaranteed to be a parent of target
)target
- the virtual file to act upon
public long getLastModified(VirtualFile mountPoint, VirtualFile target)
getLastModified
in interface FileSystem
mountPoint
- the mount point of the filesystem instance (guaranteed to be a parent of target
)target
- the virtual file to act upon
public boolean exists(VirtualFile mountPoint, VirtualFile target)
exists
in interface FileSystem
mountPoint
- the mount point of the filesystem instance (guaranteed to be a parent of target
)target
- the virtual file to act upon
true
if the file exists, false
otherwisepublic boolean isFile(VirtualFile mountPoint, VirtualFile target)
isFile
in interface FileSystem
mountPoint
- the mount point of the filesystem instance (guaranteed to be a parent of target
)target
- the virtual file to act upon
true
if the file exists and is a plain file, false
otherwisepublic boolean isDirectory(VirtualFile mountPoint, VirtualFile target)
isDirectory
in interface FileSystem
mountPoint
- the mount point of the filesystem instance (guaranteed to be a parent of target
)target
- the virtual file to act upon
true
if the file exists and is a directory, false
otherwisepublic List<String> getDirectoryEntries(VirtualFile mountPoint, VirtualFile target)
getDirectoryEntries
in interface FileSystem
mountPoint
- the mount point of the filesystem instance (guaranteed to be a parent of target
)target
- the virtual file to act upon
public CodeSigner[] getCodeSigners(VirtualFile mountPoint, VirtualFile target)
CodeSigner
s for a the virtual file.
getCodeSigners
in interface FileSystem
mountPoint
- the mount point of the filesystem instance (guaranteed to be a parent of target
)target
- the virtual file to act upon
CodeSigner
for the virtual file or null if not signed.public boolean isReadOnly()
FileSystem
implementation).
isReadOnly
in interface FileSystem
true
if the filesystem is read-onlypublic File getMountSource()
File
source provided at mount time.
getMountSource
in interface FileSystem
public void close() throws IOException
IOException
s.
close
in interface Closeable
close
in interface FileSystem
IOException
- if an I/O error occurs during close
|
JBoss VFS 3.0.1.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |