|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.virtual.plugins.context.AbstractVirtualFileHandler
org.jboss.virtual.plugins.context.AbstractURLHandler
org.jboss.virtual.plugins.context.file.FileHandler
public class FileHandler
FileHandler.
Field Summary |
---|
Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
cachedLastModified, log, vfsUrl |
Constructor Summary | |
---|---|
FileHandler(FileSystemContext context,
VirtualFileHandler parent,
java.io.File file,
java.net.URI uri)
Create a new FileHandler |
|
FileHandler(FileSystemContext context,
VirtualFileHandler parent,
java.io.File file,
java.net.URL url)
Create a new FileHandler. |
Method Summary | |
---|---|
VirtualFileHandler |
createChildHandler(java.lang.String name)
Create a virtual file context |
VirtualFileHandler |
findChild(java.lang.String path)
Find a child |
java.util.List<VirtualFileHandler> |
getChildren(boolean ignoreErrors)
Get the children |
protected java.io.File |
getFile()
Get the file for this file handler |
long |
getLastModified()
When the file was last modified |
long |
getSize()
Get the size |
FileSystemContext |
getVFSContext()
Get the VFSContext this file belongs to |
boolean |
isHidden()
Whether it is hidden |
boolean |
isLeaf()
Whether it is a simple leaf of the VFS, i.e. |
java.net.URL |
toVfsUrl()
Get a VFS-based URL |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractURLHandler |
---|
getURL, initCacheLastModified, openStream, toURI, toURL |
Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
---|
checkClosed, close, doClose, equals, getName, getParent, getPathName, getVirtualFile, hasBeenModified, hashCode, simpleFindChild, structuredFindChild, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FileHandler(FileSystemContext context, VirtualFileHandler parent, java.io.File file, java.net.URL url) throws java.io.IOException
context
- the contextparent
- the parentfile
- the fileurl
- the url
java.io.IOException
- for an error accessing the file system
java.lang.IllegalArgumentException
- for a null context, urlpublic FileHandler(FileSystemContext context, VirtualFileHandler parent, java.io.File file, java.net.URI uri) throws java.io.IOException
context
- the contextparent
- the parentfile
- the fileuri
- the uri
java.io.IOException
- for an error accessing the file system
java.lang.IllegalArgumentException
- for a null context, uriMethod Detail |
---|
public java.net.URL toVfsUrl() throws java.net.MalformedURLException, java.net.URISyntaxException
VirtualFileHandler
toVfsUrl
in interface VirtualFileHandler
toVfsUrl
in class AbstractVirtualFileHandler
java.net.MalformedURLException
java.net.URISyntaxException
public FileSystemContext getVFSContext()
VirtualFileHandler
getVFSContext
in interface VirtualFileHandler
getVFSContext
in class AbstractVirtualFileHandler
protected java.io.File getFile()
public long getLastModified()
VirtualFileHandler
getLastModified
in interface VirtualFileHandler
getLastModified
in class AbstractURLHandler
public long getSize()
VirtualFileHandler
getSize
in interface VirtualFileHandler
getSize
in class AbstractURLHandler
public boolean isLeaf()
VirtualFileHandler
isLeaf
in interface VirtualFileHandler
public boolean isHidden()
VirtualFileHandler
isHidden
in interface VirtualFileHandler
isHidden
in class AbstractURLHandler
public java.util.List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws java.io.IOException
VirtualFileHandler
getChildren
in interface VirtualFileHandler
ignoreErrors
- whether to ignore errors
java.io.IOException
- for an error accessing the file systempublic VirtualFileHandler findChild(java.lang.String path) throws java.io.IOException
VirtualFileHandler
findChild
in interface VirtualFileHandler
path
- the path
java.io.IOException
- for an error accessing the file system (or the child doesn't exist)public VirtualFileHandler createChildHandler(java.lang.String name) throws java.io.IOException
StructuredVirtualFileHandler
createChildHandler
in interface StructuredVirtualFileHandler
name
- the name
java.io.IOException
- for any error accessing the virtual file system
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |