| org.mule.util.IOUtils
IOUtils | public class IOUtils extends org.apache.commons.io.IOUtils (Code) | | Mule input/output utilities.
|
Method Summary | |
public static InputStream | getResourceAsStream(String resourceName, Class callingClass) Attempts to load a resource from the file system, from a URL, or from the
classpath, in that order. | public static InputStream | getResourceAsStream(String resourceName, Class callingClass, boolean tryAsFile, boolean tryAsUrl) Attempts to load a resource from the file system, from a URL, or from the
classpath, in that order. | public static String | getResourceAsString(String resourceName, Class callingClass) Attempts to load a resource from the file system, from a URL, or from the
classpath, in that order. | public static URL | getResourceAsUrl(String resourceName, Class callingClass) Attempts to load a resource from the file system or from the classpath, in
that order. | public static URL | getResourceAsUrl(String resourceName, Class callingClass, boolean tryAsFile, boolean tryAsUrl) Attempts to load a resource from the file system or from the classpath, in
that order. | public static byte[] | toByteArray(InputStream input) This method wraps
org.apache.commons.io.IOUtils ' toByteArray(InputStream)
method but catches any
IOException and wraps it into a
RuntimeException . | public static String | toString(InputStream input) This method wraps
org.apache.commons.io.IOUtils ' toString(InputStream)
method but catches any
IOException and wraps it into a
RuntimeException . |
getResourceAsStream | public static InputStream getResourceAsStream(String resourceName, Class callingClass) throws IOException(Code) | | Attempts to load a resource from the file system, from a URL, or from the
classpath, in that order.
Parameters: resourceName - The name of the resource to load Parameters: callingClass - The Class object of the calling object an InputStream to the resource or null if resource not found throws: java.io.IOException - IO error |
getResourceAsStream | public static InputStream getResourceAsStream(String resourceName, Class callingClass, boolean tryAsFile, boolean tryAsUrl) throws IOException(Code) | | Attempts to load a resource from the file system, from a URL, or from the
classpath, in that order.
Parameters: resourceName - The name of the resource to load Parameters: callingClass - The Class object of the calling object Parameters: tryAsFile - - try to load the resource from the local file system Parameters: tryAsUrl - - try to load the resource as a URL an InputStream to the resource or null if resource not found throws: java.io.IOException - IO error |
getResourceAsString | public static String getResourceAsString(String resourceName, Class callingClass) throws IOException(Code) | | Attempts to load a resource from the file system, from a URL, or from the
classpath, in that order.
Parameters: resourceName - The name of the resource to load Parameters: callingClass - The Class object of the calling object the requested resource as a string throws: java.io.IOException - IO error |
getResourceAsUrl | public static URL getResourceAsUrl(String resourceName, Class callingClass)(Code) | | Attempts to load a resource from the file system or from the classpath, in
that order.
Parameters: resourceName - The name of the resource to load Parameters: callingClass - The Class object of the calling object an URL to the resource or null if resource not found |
getResourceAsUrl | public static URL getResourceAsUrl(String resourceName, Class callingClass, boolean tryAsFile, boolean tryAsUrl)(Code) | | Attempts to load a resource from the file system or from the classpath, in
that order.
Parameters: resourceName - The name of the resource to load Parameters: callingClass - The Class object of the calling object Parameters: tryAsFile - - try to load the resource from the local file system Parameters: tryAsUrl - - try to load the resource as a Url string an URL to the resource or null if resource not found |
|
|