Package org.eclipse.jetty.util.resource
Class JarFileResource
java.lang.Object
org.eclipse.jetty.util.resource.Resource
org.eclipse.jetty.util.resource.URLResource
org.eclipse.jetty.util.resource.JarResource
org.eclipse.jetty.util.resource.JarFileResource
- All Implemented Interfaces:
Closeable,AutoCloseable,ResourceFactory
Deprecated.
-
Field Summary
Fields inherited from class org.eclipse.jetty.util.resource.Resource
__defaultUseCaches -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.Release any resources held by the resource.booleanexists()Deprecated.Returns true if the represented resource exists.Deprecated.static ResourcegetNonCachingResource(Resource resource) Deprecated.Take a Resource that possibly might use URLConnection caching and turn it into one that doesn't.booleanisContainedIn(Resource resource) Deprecated.Check if this jar:file: resource is contained in the named resource.booleanDeprecated.Returns true if the represented resource is a container/directory.longDeprecated.Returns the last modified timelonglength()Deprecated.Return the length of the resourceString[]list()Deprecated.Returns a list of resource names contained in the given resourceMethods inherited from class org.eclipse.jetty.util.resource.JarResource
copyTo, getFile, getInputStream, newJarResourceMethods inherited from class org.eclipse.jetty.util.resource.URLResource
addPath, delete, equals, getName, getReadableByteChannel, getURL, getUseCaches, hashCode, renameTo, toStringMethods inherited from class org.eclipse.jetty.util.resource.Resource
encode, getAlias, getAllResources, getAssociate, getDefaultUseCaches, getListHTML, getListHTML, getResource, getURI, getWeakETag, getWeakETag, isAlias, isContainedIn, isSame, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, release, setAssociate, setDefaultUseCaches, toURL, writeTo
-
Method Details
-
close
public void close()Deprecated.Description copied from class:URLResourceRelease any resources held by the resource.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classJarResource
-
exists
public boolean exists()Deprecated.Returns true if the represented resource exists.- Overrides:
existsin classJarResource- Returns:
- true if the represented resource exists.
-
isDirectory
public boolean isDirectory()Deprecated.Returns true if the represented resource is a container/directory. If the resource is not a file, resources ending with "/" are considered directories.- Overrides:
isDirectoryin classURLResource- Returns:
- true if the represented resource is a container/directory. if the resource is not a file, resources ending with "/" are considered directories.
-
lastModified
public long lastModified()Deprecated.Returns the last modified time- Overrides:
lastModifiedin classURLResource- Returns:
- the last modified time as milliseconds since unix epoch
-
list
Deprecated.Description copied from class:URLResourceReturns a list of resource names contained in the given resource- Overrides:
listin classURLResource- Returns:
- a list of resource names contained in the given resource, or null. Note: The resource names are not URL encoded.
-
length
public long length()Deprecated.Return the length of the resource- Overrides:
lengthin classURLResource- Returns:
- the length of the resource
-
getNonCachingResource
Deprecated.Take a Resource that possibly might use URLConnection caching and turn it into one that doesn't.- Parameters:
resource- the JarFileResource to obtain without URLConnection caching.- Returns:
- the non-caching resource
-
isContainedIn
Deprecated.Check if this jar:file: resource is contained in the named resource. Egjar:file:///a/b/c/foo.jar!/x.htmlisContainedInfile:///a/b/c/foo.jar- Overrides:
isContainedInin classURLResource- Parameters:
resource- the resource to test for- Returns:
- true if resource is contained in the named resource
- Throws:
MalformedURLException- if unable to process is contained due to invalid URL format
-
getJarFile
Deprecated.
-