|
||||||||||
| 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
public abstract class AbstractURLHandler
URLHandler.
| Field Summary |
|---|
| Fields inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
cachedLastModified, log |
| Constructor Summary | |
|---|---|
AbstractURLHandler(VFSContext context,
VirtualFileHandler parent,
URL url,
String name)
Create a newURLHandler. |
|
| Method Summary | |
|---|---|
boolean |
exists()
Basis existence on URLConnection.getLastModified() != 0. |
long |
getLastModified()
When the file was last modified |
long |
getSize()
Get the size |
URL |
getURL()
Get the url |
protected void |
initCacheLastModified()
|
boolean |
isHidden()
Whether it is hidden |
protected URLConnection |
openConnection()
Open connection. |
protected static URLConnection |
openConnection(URL url)
Open connection. |
InputStream |
openStream()
Access the file contents. |
URI |
toURI()
Get the VF URI (file://root/org/jboss/X.java) |
URL |
toURL()
Get the VF URL (file://root/org/jboss/X.java) |
| Methods inherited from class org.jboss.virtual.plugins.context.AbstractVirtualFileHandler |
|---|
checkClosed, checkParentExists, cleanup, close, decrement, delete, doClose, equals, getChildPathName, getChildVfsUrl, getLocalPathName, getLocalVFSContext, getName, getParent, getPathName, getRealURL, getReferences, getVFSContext, getVfsUrl, getVirtualFile, hasBeenModified, hashCode, increment, internalReplaceChild, isArchive, isTemporary, replaceChild, setPathName, setVfsUrl, simpleFindChild, structuredFindChild, toInternalVfsUrl, toString, toStringLocal, toVfsUrl |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.virtual.spi.VirtualFileHandler |
|---|
getChild, getChildren, isLeaf, isNested, removeChild |
| Constructor Detail |
|---|
public AbstractURLHandler(VFSContext context,
VirtualFileHandler parent,
URL url,
String name)
context - the contextparent - the parenturl - the urlname - the name
IllegalArgumentException - for a null context, vfsPath or url| Method Detail |
|---|
protected URLConnection openConnection()
throws IOException
IOException - for any error
protected static URLConnection openConnection(URL url)
throws IOException
url - the url to open
IOException - for any errorprotected void initCacheLastModified()
public URL getURL()
public URL toURL()
throws MalformedURLException,
URISyntaxException
VirtualFileHandler
toURL in interface VirtualFileHandlertoURL in class AbstractVirtualFileHandlerMalformedURLException - for any error
URISyntaxException - for an error parsing the URI
public long getLastModified()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file system
public long getSize()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file system
public boolean exists()
throws IOException
IOException - - thrown on failure to detect existence.URLConnection.getLastModified(),
org.jboss.test.virtual.test.URLExistsUnitTestCase
public boolean isHidden()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file system
public InputStream openStream()
throws IOException
VirtualFileHandler
IOException - for any problem accessing the virtual file system
public URI toURI()
throws URISyntaxException
VirtualFileHandler
URISyntaxException - for an error parsing the URI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||