Class MountedPathResource
java.lang.Object
org.eclipse.jetty.util.resource.Resource
org.eclipse.jetty.util.resource.PathResource
org.eclipse.jetty.util.resource.MountedPathResource
Java NIO Path Resource with file system pooling.
FileSystem implementations that must be closed
must use this class, for instance the one handling the `jar` scheme.-
Field Summary
Fields inherited from class PathResource
SUPPORTED_SCHEMES -
Method Summary
Modifier and TypeMethodDescriptiongetName()The full name of the resource.booleanisContainedIn(Resource container) Return true if this resource is contained in the Resource r, either because r is a folder or a jar file or any form of resource capable of containing other resources.protected ResourcenewResource(Path path, URI uri) Internal override for creating a new PathResource.Methods inherited from class PathResource
contains, equals, exists, getFileName, getPath, getRealPath, getRealURI, getURI, hashCode, isAlias, isDirectory, isReadable, isSameName, lastModified, length, list, resolve, toString, toUriMethods inherited from class Resource
copyTo, dump, getAllResources, getPathTo, isSameFile, iterator, newInputStream, newReadableByteChannelMethods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
newResource
Description copied from class:PathResourceInternal override for creating a new PathResource. Used by MountedPathResource (eg)- Overrides:
newResourcein classPathResource
-
isContainedIn
Description copied from class:ResourceReturn true if this resource is contained in the Resource r, either because r is a folder or a jar file or any form of resource capable of containing other resources.- Overrides:
isContainedInin classResource- Parameters:
container- the containing resource- Returns:
- true if this Resource is contained, false otherwise
- See Also:
-
getContainerPath
-
getName
Description copied from class:ResourceThe full name of the resource.- Overrides:
getNamein classPathResource- Returns:
- the full name of the resource, or null if there is no name for the resource.
-