|
||||||||||
| 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 |
| Constructor Summary | |
|---|---|
MemoryContextHandler(VFSContext context,
VirtualFileHandler parent,
URL url,
String name)
|
|
| Method Summary | |
|---|---|
protected void |
addChild(String name,
MemoryContextHandler child)
|
VirtualFileHandler |
createChildHandler(String name)
Called by structuredFindChild |
boolean |
exists()
Basis existence on URLConnection.getLastModified() ! |
VirtualFileHandler |
getChild(String path)
Get a child |
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. whether it can contain other files |
InputStream |
openStream()
Access the file contents. |
void |
setContents(byte[] contents)
|
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, checkParentExists, close, decrement, doClose, equals, getChildPathName, getChildVfsUrl, getName, getParent, getPathName, getVFSContext, getVfsUrl, getVirtualFile, hasBeenModified, hashCode, increment, setPathName, setVfsUrl, 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,
URL url,
String name)
| Method Detail |
|---|
protected void addChild(String name,
MemoryContextHandler child)
public List<VirtualFileHandler> getChildren(boolean ignoreErrors)
throws IOException
VirtualFileHandler
getChildren in interface VirtualFileHandlerignoreErrors - whether to ignore errors
IOException - for an error accessing the file systempublic boolean isLeaf()
VirtualFileHandler
isLeaf in interface VirtualFileHandler
public VirtualFileHandler createChildHandler(String name)
throws IOException
createChildHandler in interface StructuredVirtualFileHandlername - the name
IOException - for any error accessing the virtual file system
public VirtualFileHandler getChild(String path)
throws IOException
VirtualFileHandler
getChild in interface VirtualFileHandlerpath - the path
null if not found
IOException - for an error accessing the file system
public boolean exists()
throws IOException
AbstractURLHandler
exists in interface VirtualFileHandlerexists in class AbstractURLHandlerIOException - - 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 IOException
VirtualFileHandler
getSize in interface VirtualFileHandlergetSize in class AbstractURLHandlerIOException - for any problem accessing the virtual file system
public long getLastModified()
throws IOException
VirtualFileHandler
getLastModified in interface VirtualFileHandlergetLastModified in class AbstractURLHandlerIOException - for any problem accessing the virtual file system
public InputStream openStream()
throws IOException
VirtualFileHandler
openStream in interface VirtualFileHandleropenStream in class AbstractURLHandlerIOException - for any problem accessing the virtual file system
public URL toVfsUrl()
throws MalformedURLException,
URISyntaxException
VirtualFileHandler
toVfsUrl in interface VirtualFileHandlertoVfsUrl in class AbstractVirtualFileHandlerMalformedURLException - for any error
URISyntaxException - for an error parsing the URI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||