public abstract class AbstractArchiveResource extends AbstractResource
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractArchiveResource.JarInputStreamWrapper |
sm
Modifier | Constructor and Description |
---|---|
protected |
AbstractArchiveResource(WebResourceRoot root,
String webAppPath,
String base,
String baseUrl,
JarEntry jarEntry,
String internalPath) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
See
File.canRead() . |
boolean |
delete()
See
File.delete() . |
boolean |
exists()
See
File.exists() . |
String |
getBase() |
String |
getBaseUrl() |
String |
getCanonicalPath()
|
long |
getContentLength()
See
File.length() . |
long |
getCreation()
The time the file was created.
|
long |
getLastModified()
See
File.lastModified() . |
String |
getName()
See
File.getName() . |
JarEntry |
getResource() |
URL |
getURL()
Obtain a URL to access the resource or
null if no such URL
is available or if the resource does not exist. |
boolean |
isDirectory()
See
File.isDirectory() . |
boolean |
isFile()
See
File.isFile() . |
boolean |
isVirtual()
Indicates if this resource is required for applications to correctly scan
the file structure but that does not exist in either the main or any
additional
WebResourceSet . |
getContent, getETag, getLastModifiedHttp, getLog, getMimeType, getWebappPath, getWebResourceRoot, setMimeType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputStream
public String getBase()
public String getBaseUrl()
public JarEntry getResource()
public long getLastModified()
WebResource
File.lastModified()
.public boolean exists()
WebResource
File.exists()
.public boolean isVirtual()
WebResource
WebResourceSet
. For example, if an external
directory is mapped to /WEB-INF/lib in an otherwise empty web
application, /WEB-INF will be represented as a virtual resource.public boolean isDirectory()
WebResource
File.isDirectory()
.public boolean isFile()
WebResource
File.isFile()
.public boolean delete()
WebResource
File.delete()
.public String getName()
WebResource
File.getName()
.public long getContentLength()
WebResource
File.length()
.public String getCanonicalPath()
WebResource
public boolean canRead()
WebResource
File.canRead()
.public long getCreation()
WebResource
WebResource.getLastModified()
will be returned.public URL getURL()
WebResource
null
if no such URL
is available or if the resource does not exist.Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.