|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.io.IOUtils
org.mule.util.IOUtils
public class IOUtils
Mule input/output utilities.
Field Summary |
---|
Fields inherited from class org.apache.commons.io.IOUtils |
---|
DIR_SEPARATOR, DIR_SEPARATOR_UNIX, DIR_SEPARATOR_WINDOWS, LINE_SEPARATOR, LINE_SEPARATOR_UNIX, LINE_SEPARATOR_WINDOWS |
Constructor Summary | |
---|---|
IOUtils()
|
Method Summary | |
---|---|
static java.io.InputStream |
getResourceAsStream(java.lang.String resourceName,
java.lang.Class callingClass)
Attempts to load a resource from the file system, from a URL, or from the classpath, in that order. |
static java.io.InputStream |
getResourceAsStream(java.lang.String resourceName,
java.lang.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. |
static java.lang.String |
getResourceAsString(java.lang.String resourceName,
java.lang.Class callingClass)
Attempts to load a resource from the file system, from a URL, or from the classpath, in that order. |
static java.net.URL |
getResourceAsUrl(java.lang.String resourceName,
java.lang.Class callingClass)
Attempts to load a resource from the file system or from the classpath, in that order. |
static java.net.URL |
getResourceAsUrl(java.lang.String resourceName,
java.lang.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(java.io.InputStream input)
This method wraps IOUtils ' toByteArray(InputStream)
method but catches any IOException and wraps it into a RuntimeException . |
static java.lang.String |
toString(java.io.InputStream input)
This method wraps IOUtils ' toString(InputStream)
method but catches any IOException and wraps it into a RuntimeException . |
Methods inherited from class org.apache.commons.io.IOUtils |
---|
closeQuietly, closeQuietly, closeQuietly, closeQuietly, contentEquals, contentEquals, copy, copy, copy, copy, copy, copy, copyLarge, copyLarge, lineIterator, lineIterator, readLines, readLines, readLines, toByteArray, toByteArray, toByteArray, toCharArray, toCharArray, toCharArray, toInputStream, toInputStream, toString, toString, toString, toString, write, write, write, write, write, write, write, write, write, write, write, write, writeLines, writeLines, writeLines |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IOUtils()
Method Detail |
---|
public static java.lang.String getResourceAsString(java.lang.String resourceName, java.lang.Class callingClass) throws java.io.IOException
resourceName
- The name of the resource to loadcallingClass
- The Class object of the calling object
java.io.IOException
- IO errorpublic static java.io.InputStream getResourceAsStream(java.lang.String resourceName, java.lang.Class callingClass) throws java.io.IOException
resourceName
- The name of the resource to loadcallingClass
- The Class object of the calling object
java.io.IOException
- IO errorpublic static java.io.InputStream getResourceAsStream(java.lang.String resourceName, java.lang.Class callingClass, boolean tryAsFile, boolean tryAsUrl) throws java.io.IOException
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
java.io.IOException
- IO errorpublic static java.net.URL getResourceAsUrl(java.lang.String resourceName, java.lang.Class callingClass)
resourceName
- The name of the resource to loadcallingClass
- The Class object of the calling object
public static java.net.URL getResourceAsUrl(java.lang.String resourceName, java.lang.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 string
public static java.lang.String toString(java.io.InputStream input)
IOUtils
' toString(InputStream)
method but catches any IOException
and wraps it into a RuntimeException
.
public static byte[] toByteArray(java.io.InputStream input)
IOUtils
' toByteArray(InputStream)
method but catches any IOException
and wraps it into a RuntimeException
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |