Top Description Fields Constructors Methods
org.springframework.core.io

public abstract Class VfsUtils

extends Object
Class Inheritance
Known Direct Subclasses
org.springframework.core.io.support.VfsPatternUtils
Imports
java.io.File, .IOException, .InputStream, java.lang.reflect.Field, .InvocationTargetException, .Method, java.net.URI, .URL, org.springframework.lang.Nullable, org.springframework.util.ReflectionUtils

Utility for detecting and accessing JBoss VFS in the classpath.

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+.

Thanks go to Marius Bogoevici for the initial implementation.

Note

This is an internal class and should not be used outside the framework.

Authors
Costin Leau, Juergen Hoeller
Since
3.0.3

Field Summary

Modifier and TypeField and Description
private static final String
private static final Method
private static final Method
private static final String
private static final Method
private static final Method
private static final Method
private static final Method
private static final Method
private static final Method
private static final Method
private static final Method
private static final Method
private static final Method
protected static final Method
protected static final Class<?>
private static final Field

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected static String
doGetPath(Object resource)

protected static Object
pack-priv static boolean
exists(Object vfsResource)

pack-priv static Object
getChild(Object vfsResource, String path)

pack-priv static File
getFile(Object vfsResource)

pack-priv static InputStream
getInputStream(Object vfsResource)

pack-priv static long
getLastModified(Object vfsResource)

pack-priv static String
getName(Object vfsResource)

pack-priv static Object
pack-priv static Object
getRoot(URI url)

protected static Object
getRoot(URL url)

pack-priv static long
getSize(Object vfsResource)

pack-priv static URI
getURI(Object vfsResource)

pack-priv static URL
getURL(Object vfsResource)

protected static Object
invokeVfsMethod(Method method, Object target, Object... args)

pack-priv static boolean
isReadable(Object vfsResource)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VFS3_PKGback to summary
private static final String VFS3_PKG
VFS_METHOD_GET_ROOT_URIback to summary
private static final Method VFS_METHOD_GET_ROOT_URI
VFS_METHOD_GET_ROOT_URLback to summary
private static final Method VFS_METHOD_GET_ROOT_URL
VFS_NAMEback to summary
private static final String VFS_NAME
VIRTUAL_FILE_METHOD_EXISTSback to summary
private static final Method VIRTUAL_FILE_METHOD_EXISTS
VIRTUAL_FILE_METHOD_GET_CHILDback to summary
private static final Method VIRTUAL_FILE_METHOD_GET_CHILD
VIRTUAL_FILE_METHOD_GET_INPUT_STREAMback to summary
private static final Method VIRTUAL_FILE_METHOD_GET_INPUT_STREAM
VIRTUAL_FILE_METHOD_GET_LAST_MODIFIEDback to summary
private static final Method VIRTUAL_FILE_METHOD_GET_LAST_MODIFIED
VIRTUAL_FILE_METHOD_GET_NAMEback to summary
private static final Method VIRTUAL_FILE_METHOD_GET_NAME
VIRTUAL_FILE_METHOD_GET_PATH_NAMEback to summary
private static final Method VIRTUAL_FILE_METHOD_GET_PATH_NAME
VIRTUAL_FILE_METHOD_GET_PHYSICAL_FILEback to summary
private static final Method VIRTUAL_FILE_METHOD_GET_PHYSICAL_FILE
VIRTUAL_FILE_METHOD_GET_SIZEback to summary
private static final Method VIRTUAL_FILE_METHOD_GET_SIZE
VIRTUAL_FILE_METHOD_TO_URIback to summary
private static final Method VIRTUAL_FILE_METHOD_TO_URI
VIRTUAL_FILE_METHOD_TO_URLback to summary
private static final Method VIRTUAL_FILE_METHOD_TO_URL
VIRTUAL_FILE_METHOD_VISITback to summary
protected static final Method VIRTUAL_FILE_METHOD_VISIT
VIRTUAL_FILE_VISITOR_INTERFACEback to summary
protected static final Class<?> VIRTUAL_FILE_VISITOR_INTERFACE
VISITOR_ATTRIBUTES_FIELD_RECURSEback to summary
private static final Field VISITOR_ATTRIBUTES_FIELD_RECURSE

Constructor Detail

VfsUtilsback to summary
public VfsUtils()

Method Detail

doGetPathback to summary
protected static String doGetPath(Object resource)
Annotations
@Nullable
doGetVisitorAttributesback to summary
protected static Object doGetVisitorAttributes()
Annotations
@Nullable
existsback to summary
pack-priv static boolean exists(Object vfsResource)
getChildback to summary
pack-priv static Object getChild(Object vfsResource, String path) throws IOException
getFileback to summary
pack-priv static File getFile(Object vfsResource) throws IOException
getInputStreamback to summary
pack-priv static InputStream getInputStream(Object vfsResource) throws IOException
getLastModifiedback to summary
pack-priv static long getLastModified(Object vfsResource) throws IOException
getNameback to summary
pack-priv static String getName(Object vfsResource)
getRelativeback to summary
pack-priv static Object getRelative(URL url) throws IOException
getRootback to summary
pack-priv static Object getRoot(URI url) throws IOException
getRootback to summary
protected static Object getRoot(URL url) throws IOException
getSizeback to summary
pack-priv static long getSize(Object vfsResource) throws IOException
getURIback to summary
pack-priv static URI getURI(Object vfsResource) throws IOException
getURLback to summary
pack-priv static URL getURL(Object vfsResource) throws IOException
invokeVfsMethodback to summary
protected static Object invokeVfsMethod(Method method, Object target, Object... args) throws IOException
isReadableback to summary
pack-priv static boolean isReadable(Object vfsResource)