|
||||||||||
| 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 |
|---|
exists, getURL, initCacheLastModified, openStream, toURI, toURL |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
checkClosed, close, decrement, doClose, equals, getName, getParent, getPathName, getVirtualFile, hasBeenModified, hashCode, increment, setPathName, 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, url
public 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, uri| Method Detail |
|---|
public java.net.URL toVfsUrl()
throws java.net.MalformedURLException,
java.net.URISyntaxException
VirtualFileHandler
toVfsUrl in interface VirtualFileHandlertoVfsUrl in class AbstractVirtualFileHandlerjava.net.MalformedURLException
java.net.URISyntaxExceptionpublic FileSystemContext getVFSContext()
VirtualFileHandler
getVFSContext in interface VirtualFileHandlergetVFSContext in class AbstractVirtualFileHandlerprotected java.io.File getFile()
public long getLastModified()
VirtualFileHandler
getLastModified in interface VirtualFileHandlergetLastModified in class AbstractURLHandlerpublic long getSize()
VirtualFileHandler
getSize in interface VirtualFileHandlergetSize in class AbstractURLHandlerpublic boolean isLeaf()
VirtualFileHandler
isLeaf in interface VirtualFileHandlerpublic boolean isHidden()
VirtualFileHandler
isHidden in interface VirtualFileHandlerisHidden in class AbstractURLHandler
public java.util.List<VirtualFileHandler> getChildren(boolean ignoreErrors)
throws java.io.IOException
VirtualFileHandler
getChildren in interface VirtualFileHandlerignoreErrors - whether to ignore errors
java.io.IOException - for an error accessing the file system
public VirtualFileHandler findChild(java.lang.String path)
throws java.io.IOException
VirtualFileHandler
findChild in interface VirtualFileHandlerpath - 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 StructuredVirtualFileHandlername - 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 | |||||||||