public abstract class VfsUtils extends Object
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 patch. Note: This is an internal class and should not be used outside the framework.
| Modifier and Type | Field and Description |
|---|---|
protected static Method |
VIRTUAL_FILE_METHOD_VISIT |
protected static Class<?> |
VIRTUAL_FILE_VISITOR_INTERFACE |
| Constructor and Description |
|---|
VfsUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
doGetPath(Object resource) |
protected static <T> T |
doGetVisitorAttribute() |
static boolean |
exists(Object vfsResource) |
static File |
getFile(Object vfsResource) |
static <T> T |
getChild(Object vfsResource,
String path) |
static InputStream |
getInputStream(Object vfsResource) |
static long |
getLastModified(Object vfsResource) |
static String |
getName(Object vfsResource) |
static <T> T |
getRelative(URL url) |
static <T> T |
getRoot(URI url) |
static <T> T |
getRoot(URL url) |
static long |
getSize(Object vfsResource) |
static URI |
getURI(Object vfsResource) |
static URL |
getURL(Object vfsResource) |
protected static <T> T |
invokeVfsMethod(Method method,
Object target,
Object... args) |
static boolean |
isReadable(Object vfsResource) |
protected static Class<?> VIRTUAL_FILE_VISITOR_INTERFACE
protected static Method VIRTUAL_FILE_METHOD_VISIT
protected static <T> T invokeVfsMethod(Method method, Object target, Object... args) throws IOException
IOExceptionpublic static boolean exists(Object vfsResource)
public static boolean isReadable(Object vfsResource)
public static long getSize(Object vfsResource) throws IOException
IOExceptionpublic static long getLastModified(Object vfsResource) throws IOException
IOExceptionpublic static InputStream getInputStream(Object vfsResource) throws IOException
IOExceptionpublic static URL getURL(Object vfsResource) throws IOException
IOExceptionpublic static URI getURI(Object vfsResource) throws IOException
IOExceptionpublic static <T> T getRelative(URL url) throws IOException
IOExceptionpublic static <T> T getChild(Object vfsResource, String path) throws IOException
IOExceptionpublic static File getFile(Object vfsResource) throws IOException
IOExceptionpublic static <T> T getRoot(URI url) throws IOException
IOExceptionpublic static <T> T getRoot(URL url) throws IOException
IOExceptionprotected static <T> T doGetVisitorAttribute()
Copyright © 2018. All rights reserved.