ResourceFactoryJarFileResourcepublic class JarResource extends URLResource
| Modifier and Type | Field | Description |
|---|---|---|
protected java.net.JarURLConnection |
_jarConnection |
__defaultUseCaches_connection, _in, _url, _urlString| Modifier | Constructor | Description |
|---|---|---|
protected |
JarResource(java.net.URL url) |
|
protected |
JarResource(java.net.URL url,
boolean useCaches) |
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
checkConnection() |
|
void |
close() |
Release any resources held by the resource.
|
void |
copyTo(java.io.File directory) |
Copy the Resource to the new destination file.
|
boolean |
exists() |
Returns true if the represented resource exists.
|
java.io.File |
getFile() |
Returns an File representing the given resource or NULL if this
is not possible.
|
java.io.InputStream |
getInputStream() |
Returns an input stream to the resource.
|
protected void |
newConnection() |
|
static Resource |
newJarResource(Resource resource) |
encode, 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, isContainedIn, isDirectory, lastModified, length, list, renameTo, toStringprotected JarResource(java.net.URL url)
protected JarResource(java.net.URL url,
boolean useCaches)
public void close()
URLResourceclose in class URLResourceprotected boolean checkConnection()
checkConnection in class URLResourceprotected void newConnection()
throws java.io.IOException
java.io.IOException - Sub-classes of JarResource may throw an IOException (or subclass)public boolean exists()
exists in class URLResourcepublic java.io.File getFile()
throws java.io.IOException
URLResourcegetFile in class URLResourcejava.io.IOException - if unable to get the resource due to permissionspublic java.io.InputStream getInputStream()
throws java.io.IOException
URLResourcegetInputStream in class URLResourcejava.io.IOException - if unable to open the input streampublic void copyTo(java.io.File directory)
throws java.io.IOException
ResourceWill not replace existing destination file.
Copyright © 1995–2017 Webtide. All rights reserved.