public class IOUtils extends Object
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static URL |
getResourceAsUrl(String resourceName,
Class callingClass)
Attempts to load a resource from the file system or from the classpath, in that order.
|
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.
|
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 byte[] toByteArray(InputStream input)
org.apache.commons.io.IOUtils' toByteArray(InputStream) method but catches any
IOException and wraps it into a RuntimeException.input - public static URL getResourceAsUrl(String resourceName, Class callingClass)
resourceName - The name of the resource to loadcallingClass - The Class object of the calling objectpublic static URL getResourceAsUrl(String resourceName, Class callingClass, boolean tryAsFile, boolean tryAsUrl)
resourceName - The name of the resource to loadcallingClass - The Class object of the calling objecttryAsFile - - try to load the resource from the local file systemtryAsUrl - - try to load the resource as a Url stringCopyright © 2019 MuleSoft, Inc.. All rights reserved.