Class VfsUtils
- java.lang.Object
-
- org.hotswap.agent.util.spring.util.VfsUtils
-
public abstract class VfsUtils extends Object
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 patch. Note: This is an internal class and should not be used outside the framework.
- Since:
- 3.0.3
- Author:
- Costin Leau, Juergen Hoeller
-
-
Field Summary
Fields Modifier and Type Field Description protected static MethodVIRTUAL_FILE_METHOD_VISITprotected static Class<?>VIRTUAL_FILE_VISITOR_INTERFACE
-
Constructor Summary
Constructors Constructor Description VfsUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static StringdoGetPath(Object resource)protected static <T> TdoGetVisitorAttribute()static booleanexists(Object vfsResource)static FilegetFile(Object vfsResource)static <T> TgetChild(Object vfsResource, String path)static InputStreamgetInputStream(Object vfsResource)static longgetLastModified(Object vfsResource)static StringgetName(Object vfsResource)static <T> TgetRelative(URL url)static <T> TgetRoot(URI url)static <T> TgetRoot(URL url)static longgetSize(Object vfsResource)static URIgetURI(Object vfsResource)static URLgetURL(Object vfsResource)protected static <T> TinvokeVfsMethod(Method method, Object target, Object... args)static booleanisReadable(Object vfsResource)
-
-
-
Method Detail
-
invokeVfsMethod
protected static <T> T invokeVfsMethod(Method method, Object target, Object... args) throws IOException
- Throws:
IOException
-
exists
public static boolean exists(Object vfsResource)
-
isReadable
public static boolean isReadable(Object vfsResource)
-
getSize
public static long getSize(Object vfsResource) throws IOException
- Throws:
IOException
-
getLastModified
public static long getLastModified(Object vfsResource) throws IOException
- Throws:
IOException
-
getInputStream
public static InputStream getInputStream(Object vfsResource) throws IOException
- Throws:
IOException
-
getURL
public static URL getURL(Object vfsResource) throws IOException
- Throws:
IOException
-
getURI
public static URI getURI(Object vfsResource) throws IOException
- Throws:
IOException
-
getRelative
public static <T> T getRelative(URL url) throws IOException
- Throws:
IOException
-
getChild
public static <T> T getChild(Object vfsResource, String path) throws IOException
- Throws:
IOException
-
getFile
public static File getFile(Object vfsResource) throws IOException
- Throws:
IOException
-
getRoot
public static <T> T getRoot(URI url) throws IOException
- Throws:
IOException
-
getRoot
public static <T> T getRoot(URL url) throws IOException
- Throws:
IOException
-
doGetVisitorAttribute
protected static <T> T doGetVisitorAttribute()
-
-