org.springframework.core.io

Class VfsResource

  • All Implemented Interfaces:
    InputStreamSource, Resource

    public class VfsResource
    extends AbstractResource
    VFS based Resource implementation. Supports the corresponding VFS API versions on JBoss AS 5.x as well as 6.x and 7.x.
    Since:
    3.0
    Author:
    Ales Justin, Juergen Hoeller, Costin Leau
    See Also:
    VirtualFile
    • Constructor Summary

      Constructors  
      Constructor and Description
      VfsResource(Object resources) 
    • Method Summary

      Methods  
      Modifier and Type Method and Description
      long contentLength()
      This implementation reads the entire InputStream to calculate the content length.
      Resource createRelative(String relativePath)
      This implementation throws a FileNotFoundException, assuming that relative resources cannot be created for this resource.
      boolean equals(Object obj)
      This implementation compares description strings.
      boolean exists()
      This implementation checks whether a File can be opened, falling back to whether an InputStream can be opened.
      String getDescription()
      Return a description for this resource, to be used for error output when working with the resource.
      File getFile()
      This implementation throws a FileNotFoundException, assuming that the resource cannot be resolved to an absolute file path.
      String getFilename()
      This implementation always returns null, assuming that this resource type does not have a filename.
      InputStream getInputStream()
      Return an InputStream.
      URI getURI()
      This implementation builds a URI based on the URL returned by AbstractResource.getURL().
      URL getURL()
      This implementation throws a FileNotFoundException, assuming that the resource cannot be resolved to a URL.
      int hashCode()
      This implementation returns the description's hash code.
      boolean isReadable()
      This implementation always returns true.
      long lastModified()
      This implementation checks the timestamp of the underlying File, if available.
    • Constructor Detail

      • VfsResource

        public VfsResource(Object resources)