|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.filesystems.FileSystem org.openide.filesystems.AbstractFileSystem org.openide.filesystems.JarFileSystem
A virtual filesystem based on a JAR archive.
For historical reasons many AbstractFileSystem.* methods are implemented as protected in this class. Do not call them! Subclasses might override them, or (better) use delegation.
Nested Class Summary | |
static class |
JarFileSystem.Impl
Implementation of all interfaces List, Change, Info and Attr that delegates to JarFileSystem |
Nested classes inherited from class org.openide.filesystems.AbstractFileSystem |
AbstractFileSystem.Attr, AbstractFileSystem.Change, AbstractFileSystem.Info, AbstractFileSystem.List, AbstractFileSystem.Transfer |
Nested classes inherited from class org.openide.filesystems.FileSystem |
FileSystem.AtomicAction, FileSystem.Environment, FileSystem.HtmlStatus, FileSystem.Status |
Field Summary |
Fields inherited from class org.openide.filesystems.AbstractFileSystem |
attr, change, info, list, transfer |
Fields inherited from class org.openide.filesystems.FileSystem |
PROP_DISPLAY_NAME, PROP_HIDDEN, PROP_READ_ONLY, PROP_ROOT, PROP_SYSTEM_NAME, PROP_VALID |
Constructor Summary | |
JarFileSystem()
Default constructor. |
|
JarFileSystem(FileSystemCapability cap)
Deprecated. Useless. |
Method Summary | |
protected Enumeration |
attributes(String name)
|
protected String[] |
children(String name)
|
protected void |
createData(String name)
|
protected void |
createFolder(String name)
|
protected Reference |
createReference(FileObject fo)
Creates Reference. |
protected void |
delete(String name)
|
protected void |
deleteAttributes(String name)
|
protected void |
finalize()
Close the jar file when we go away... |
protected boolean |
folder(String name)
|
String |
getDisplayName()
Provides a name for the system that can be presented to the user. |
File |
getJarFile()
Get the file path for the ZIP or JAR file. |
Manifest |
getManifest()
Get the JAR manifest. |
protected InputStream |
inputStream(String name)
|
boolean |
isReadOnly()
This filesystem is read-only. |
protected Date |
lastModified(String name)
|
protected void |
lock(String name)
|
protected void |
markUnimportant(String name)
|
protected String |
mimeType(String name)
|
protected OutputStream |
outputStream(String name)
|
void |
prepareEnvironment(FileSystem.Environment env)
Deprecated. Useless. |
protected Object |
readAttribute(String name,
String attrName)
|
protected boolean |
readOnly(String name)
|
void |
removeNotify()
Notifies this filesystem that it has been removed from the repository. |
protected void |
rename(String oldName,
String newName)
|
protected void |
renameAttributes(String oldName,
String newName)
|
void |
setJarFile(File aRoot)
Set name of the ZIP/JAR file. |
protected long |
size(String name)
|
protected void |
unlock(String name)
|
protected void |
writeAttribute(String name,
String attrName,
Object value)
|
Methods inherited from class org.openide.filesystems.AbstractFileSystem |
canRead, canWrite, checkVirtual, existingFileObjects, find, findReference, findResource, getActions, getRefreshTime, getRoot, markImportant, refresh, refreshResource, refreshRoot, setRefreshTime |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JarFileSystem()
public JarFileSystem(FileSystemCapability cap)
cap
- the capabilityMethod Detail |
protected Reference createReference(FileObject fo)
AbstractFileSystem
createReference
in class AbstractFileSystem
fo
- is FileObject. It`s reference yourequire to get.
public Manifest getManifest()
public void setJarFile(File aRoot) throws IOException, PropertyVetoException
aRoot
- path to new ZIP or JAR file
IOException
- if the file is not valid
PropertyVetoException
public File getJarFile()
public String getDisplayName()
FileSystem
This call should never be used to attempt to identify the file root
of the filesystem. On some systems it may happen to look the same but this is a
coincidence and may well change in the future. Either check whether
you are working with a LocalFileSystem
or similar implementation and use
LocalFileSystem.getRootDirectory()
; or better, try
FileUtil.toFile(org.openide.filesystems.FileObject)
which is designed to do this correctly.
Note: for most purposes it is probably a bad idea to use
this method. Instead look at FileUtil.getFileDisplayName(org.openide.filesystems.FileObject)
.
getDisplayName
in class AbstractFileSystem
public boolean isReadOnly()
isReadOnly
in class FileSystem
true
public void removeNotify()
FileSystem
Note that this method is advisory and serves as an optimization to avoid retaining resources for too long etc. Filesystems should maintain correct semantics regardless of whether and when this method is called.
removeNotify
in class FileSystem
public void prepareEnvironment(FileSystem.Environment env)
Adds name of the ZIP/JAR file, if it has been set, to the class path.
prepareEnvironment
in class FileSystem
env
- the environment to setupprotected String[] children(String name)
protected void createFolder(String name) throws IOException
IOException
protected void createData(String name) throws IOException
IOException
protected void rename(String oldName, String newName) throws IOException
IOException
protected void delete(String name) throws IOException
IOException
protected Date lastModified(String name)
protected boolean folder(String name)
protected boolean readOnly(String name)
protected String mimeType(String name)
protected long size(String name)
protected InputStream inputStream(String name) throws FileNotFoundException
FileNotFoundException
protected OutputStream outputStream(String name) throws IOException
IOException
protected void lock(String name) throws IOException
IOException
protected void unlock(String name)
protected void markUnimportant(String name)
protected Object readAttribute(String name, String attrName)
protected void writeAttribute(String name, String attrName, Object value) throws IOException
IOException
protected Enumeration attributes(String name)
protected void renameAttributes(String oldName, String newName)
protected void deleteAttributes(String name)
protected void finalize() throws Throwable
Throwable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |