|
||||||||||
| 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 class for loading resources on the classpath or file system.
| Method Summary | |
|---|---|
static boolean |
hasScheme(String uri)
Determines whether the URI has a scheme (e.g. |
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 boolean hasScheme(String uri)
uri - the URI
public static InputStream resolveMandatoryResourceAsInputStream(ClassResolver classResolver,
String uri)
throws IOException
resolveMandatoryResourceAsUrl(org.apache.camel.spi.ClassResolver, String)
classResolver - the class resolver to load the resource from the classpathuri - URI of the resource
InputStream. Remember to close this 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 this 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 | |||||||||