ResourceFactorypublic class JarFileResource extends JarResource
_jarConnection__defaultUseCaches_connection, _in, _url, _urlString| Modifier | Constructor | Description |
|---|---|---|
protected |
JarFileResource(java.net.URL url) |
|
protected |
JarFileResource(java.net.URL url,
boolean useCaches) |
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
checkConnection() |
|
void |
close() |
Release any resources held by the resource.
|
boolean |
exists() |
Returns true if the represented resource exists.
|
static Resource |
getNonCachingResource(Resource resource) |
Take a Resource that possibly might use URLConnection caching
and turn it into one that doesn't.
|
boolean |
isContainedIn(Resource resource) |
Check if this jar:file: resource is contained in the
named resource.
|
boolean |
isDirectory() |
Returns true if the represented resource is a container/directory.
|
long |
lastModified() |
Returns the last modified time
|
long |
length() |
Return the length of the resource
|
java.lang.String[] |
list() |
Returns a list of resource names contained in the given resource
|
protected void |
newConnection() |
copyTo, getFile, getInputStream, newJarResourceencode, finalize, getAlias, getAllResources, getAssociate, getDefaultUseCaches, getListHTML, getResource, getURI, getWeakETag, getWeakETag, isAlias, isContainedIn, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, release, setAssociate, setDefaultUseCaches, toURL, writeToaddPath, delete, equals, getInputStream, getName, getReadableByteChannel, getURL, getUseCaches, hashCode, renameTo, toStringprotected JarFileResource(java.net.URL url)
protected JarFileResource(java.net.URL url,
boolean useCaches)
public void close()
URLResourceclose in class JarResourceprotected boolean checkConnection()
checkConnection in class JarResourceprotected void newConnection()
throws java.io.IOException
newConnection in class JarResourcejava.io.IOException - Sub-classes of JarResource may throw an IOException (or subclass)public boolean exists()
exists in class JarResourcepublic boolean isDirectory()
isDirectory in class URLResourcepublic long lastModified()
lastModified in class URLResourcepublic java.lang.String[] list()
URLResourcelist in class URLResourcepublic long length()
length in class URLResourcepublic static Resource getNonCachingResource(Resource resource)
resource - the JarFileResource to obtain without URLConnection caching.public boolean isContainedIn(Resource resource) throws java.net.MalformedURLException
jar:file:///a/b/c/foo.jar!/x.html isContainedIn file:///a/b/c/foo.jarisContainedIn in class URLResourceresource - the resource to test forjava.net.MalformedURLException - if unable to process is contained due to invalid URL formatCopyright © 1995–2018 Webtide. All rights reserved.