Class VfsResource

java.lang.Object
org.springframework.core.io.AbstractResource
org.springframework.core.io.VfsResource
All Implemented Interfaces:
InputStreamSource, Resource

public class VfsResource extends AbstractResource
JBoss VFS based Resource implementation.

As of Spring 4.0, this class supports VFS 3.x on JBoss AS 6+ (package org.jboss.vfs) and is in particular compatible with JBoss AS 7 and WildFly 8+.

Since:
3.0
Author:
Ales Justin, Juergen Hoeller, Costin Leau, Sam Brannen
  • Constructor Summary

    Constructors
    Constructor
    Description
    VfsResource(Object resource)
    Create a new VfsResource wrapping the given resource handle.
  • Method Summary

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

    Methods inherited from class org.springframework.core.io.AbstractResource

    getFileForLastModifiedCheck, isFile, isOpen, readableChannel, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait