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(since="2021-05-27") public class JarFileResource extends JarResource
Deprecated.
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.util.resource.Resource
__defaultUseCaches
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.Release any resources held by the resource.boolean
exists()
Deprecated.Returns true if the represented resource exists.File
getJarFile()
Deprecated.static Resource
getNonCachingResource(Resource resource)
Deprecated.Take a Resource that possibly might use URLConnection caching and turn it into one that doesn't.boolean
isContainedIn(Resource resource)
Deprecated.Check if this jar:file: resource is contained in the named resource.boolean
isDirectory()
Deprecated.Returns true if the represented resource is a container/directory.long
lastModified()
Deprecated.Returns the last modified timelong
length()
Deprecated.Return the length of the resourceString[]
list()
Deprecated.Returns a list of resource names contained in the given resource-
Methods inherited from class org.eclipse.jetty.util.resource.JarResource
copyTo, getFile, getInputStream, newJarResource
-
Methods inherited from class org.eclipse.jetty.util.resource.URLResource
addPath, delete, equals, getName, getReadableByteChannel, getURL, getUseCaches, hashCode, renameTo, toString
-
Methods 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 Detail
-
close
public void close()
Deprecated.Description copied from class:URLResource
Release any resources held by the resource.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classJarResource
-
exists
public boolean exists()
Deprecated.Returns true if the represented resource exists.- Overrides:
exists
in 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:
isDirectory
in 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:
lastModified
in classURLResource
- Returns:
- the last modified time as milliseconds since unix epoch
-
list
public String[] list()
Deprecated.Description copied from class:URLResource
Returns a list of resource names contained in the given resource- Overrides:
list
in 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:
length
in classURLResource
- Returns:
- the length of the resource
-
getNonCachingResource
public static Resource getNonCachingResource(Resource resource)
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
public boolean isContainedIn(Resource resource) throws MalformedURLException
Deprecated.Check if this jar:file: resource is contained in the named resource. Egjar:file:///a/b/c/foo.jar!/x.html
isContainedInfile:///a/b/c/foo.jar
- Overrides:
isContainedIn
in 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
public File getJarFile()
Deprecated.
-
-