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 org.eclipse.jetty.util.resource.PathResource
SUPPORTED_SCHEMES -
Method Summary
Modifier and TypeMethodDescriptiongetName()The full name of the resource.booleanReturn 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 org.eclipse.jetty.util.resource.PathResource
copyTo, equals, exists, getFileName, getPath, getRealPath, getRealURI, getURI, hashCode, isAlias, isDirectory, isReadable, isSameName, lastModified, length, list, resolve, toString, toUriMethods inherited from class org.eclipse.jetty.util.resource.Resource
dump, getAllResources, iterator, newInputStream, newReadableByteChannelMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.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 classPathResource- Parameters:
r- the containing resource- Returns:
- true if this Resource is contained, false otherwise
-
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 not backed by a Path
-