|
||||||||||
| 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.memory.MemoryContextHandler
public class MemoryContextHandler
Virtual memory context handler.
| Field Summary |
|---|
| Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
cachedLastModified, log, vfsUrl |
| Constructor Summary | |
|---|---|
MemoryContextHandler(VFSContext context,
VirtualFileHandler parent,
java.net.URL url,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
protected void |
addChild(java.lang.String name,
MemoryContextHandler child)
|
VirtualFileHandler |
createChildHandler(java.lang.String name)
Called by structuredFindChild |
boolean |
exists()
Basis existence on URLConnection.getLastModified() != 0. |
VirtualFileHandler |
findChild(java.lang.String path)
Find a child |
java.util.List<VirtualFileHandler> |
getChildren(boolean ignoreErrors)
Get the children |
long |
getLastModified()
When the file was last modified |
long |
getSize()
Get the size |
protected void |
initCacheLastModified()
|
boolean |
isLeaf()
Whether it is a simple leaf of the VFS, i.e. |
java.io.InputStream |
openStream()
Access the file contents. |
void |
setContents(byte[] contents)
|
java.net.URL |
toVfsUrl()
Get a VFS-based URL |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractURLHandler |
|---|
getURL, isHidden, toURI, toURL |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
checkClosed, close, decrement, doClose, equals, getName, getParent, getPathName, getVFSContext, 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 MemoryContextHandler(VFSContext context,
VirtualFileHandler parent,
java.net.URL url,
java.lang.String name)
| Method Detail |
|---|
protected void addChild(java.lang.String name,
MemoryContextHandler child)
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 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 systempublic boolean isLeaf()
VirtualFileHandler
isLeaf in interface VirtualFileHandler
public VirtualFileHandler createChildHandler(java.lang.String name)
throws java.io.IOException
createChildHandler in interface StructuredVirtualFileHandlername - the name
java.io.IOException - for any error accessing the virtual file system
public boolean exists()
throws java.io.IOException
AbstractURLHandler
exists in interface VirtualFileHandlerexists in class AbstractURLHandlerjava.io.IOException - - thrown on failure to detect existence.URLConnection.getLastModified(),
org.jboss.test.virtual.test.URLExistsUnitTestCasepublic void setContents(byte[] contents)
protected void initCacheLastModified()
initCacheLastModified in class AbstractURLHandler
public long getSize()
throws java.io.IOException
VirtualFileHandler
getSize in interface VirtualFileHandlergetSize in class AbstractURLHandlerjava.io.IOException - for any problem accessing the virtual file system
public long getLastModified()
throws java.io.IOException
VirtualFileHandler
getLastModified in interface VirtualFileHandlergetLastModified in class AbstractURLHandlerjava.io.IOException - for any problem accessing the virtual file system
public java.io.InputStream openStream()
throws java.io.IOException
VirtualFileHandler
openStream in interface VirtualFileHandleropenStream in class AbstractURLHandlerjava.io.IOException - for any problem accessing the virtual file system
public java.net.URL toVfsUrl()
throws java.net.MalformedURLException,
java.net.URISyntaxException
VirtualFileHandler
toVfsUrl in interface VirtualFileHandlertoVfsUrl in class AbstractVirtualFileHandlerjava.net.MalformedURLException
java.net.URISyntaxException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||