|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.util.ResourceHelper
public final class ResourceHelper
Helper for loading resources on the classpath or file system.
Method Summary | |
---|---|
static InputStream |
resolveMandatoryResourceAsInputStream(ClassResolver classResolver,
String uri)
Resolves the mandatory resource. |
static URL |
resolveMandatoryResourceAsUrl(ClassResolver classResolver,
String uri)
Resolves the mandatory resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static InputStream resolveMandatoryResourceAsInputStream(ClassResolver classResolver, String uri) throws IOException
resolveMandatoryResourceAsUrl(org.apache.camel.spi.ClassResolver, String)
if possible.
classResolver
- the class resolver to load the resource from the classpathuri
- uri of the resource
InputStream
, remember to close the stream after usage.
IOException
- is thrown if the resource file could not be found or loaded as InputStream
public static URL resolveMandatoryResourceAsUrl(ClassResolver classResolver, String uri) throws FileNotFoundException, MalformedURLException
classResolver
- the class resolver to load the resource from the classpathuri
- uri of the resource
InputStream
, remember to close the stream after usage.
FileNotFoundException
- is thrown if the resource file could not be found
MalformedURLException
- if the uri is malformed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |