Class MountedPathResource

All Implemented Interfaces:
Iterable<Resource>

@ManagedObject("A Mounted Path Resource") public class MountedPathResource extends PathResource
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.
  • Method Details

    • newResource

      protected Resource newResource(Path path, URI uri)
      Description copied from class: PathResource
      Internal override for creating a new PathResource. Used by MountedPathResource (eg)
      Overrides:
      newResource in class PathResource
    • isContainedIn

      public boolean isContainedIn(Resource container)
      Description copied from class: Resource
      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.
      Overrides:
      isContainedIn in class Resource
      Parameters:
      container - the containing resource
      Returns:
      true if this Resource is contained, false otherwise
      See Also:
    • getFileSystem

      @ManagedAttribute("The FileSystem") public FileSystem getFileSystem()
    • getContainerPath

      @ManagedAttribute("The Container Path") public Path getContainerPath()
    • getName

      public String getName()
      Description copied from class: Resource
      The full name of the resource.
      Overrides:
      getName in class PathResource
      Returns:
      the full name of the resource, or null if there is no name for the resource.