Class PathResource

    • Constructor Summary

      Constructors 
      Constructor Description
      PathResource​(String path)
      Create a new PathResource from a Path handle.
      PathResource​(URI uri)
      Create a new PathResource from a Path handle.
      PathResource​(Path path)
      Create a new PathResource from a Path handle.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long contentLength()
      This implementation returns the underlying File's length.
      Resource createRelative​(String relativePath)
      This implementation creates a FileResource, applying the given path relative to the path of the underlying file of this resource descriptor.
      boolean equals​(Object obj)
      This implementation compares the underlying Path references.
      boolean exists()
      This implementation returns whether the underlying file exists.
      String getDescription()
      Return a description for this resource, to be used for error output when working with the resource.
      File getFile()
      This implementation returns the underlying File reference.
      String getFilename()
      This implementation returns the name of the file.
      InputStream getInputStream()
      This implementation opens a InputStream for the underlying file.
      OutputStream getOutputStream()
      This implementation opens a OutputStream for the underlying file.
      String getPath()
      Return the file path for this resource.
      URI getURI()
      This implementation returns a URI for the underlying file.
      URL getURL()
      This implementation returns a URL for the underlying file.
      int hashCode()
      This implementation returns the hash code of the underlying Path reference.
      boolean isReadable()
      This implementation checks whether the underlying file is marked as readable (and corresponds to an actual file with content, not to a directory).
      boolean isWritable()
      This implementation checks whether the underlying file is marked as writable (and corresponds to an actual file with content, not to a directory).
      long lastModified()
      This implementation returns the underlying File's timestamp.
      • Methods inherited from interface org.hotswap.agent.util.spring.io.resource.Resource

        isOpen