public interface Resource
Modifier and Type | Method and Description |
---|---|
static Resource |
fromBytes(String location,
byte[] content)
Create a resource from bytes.
|
static Resource |
fromClasspath(Class<?> type,
String location)
Finds a resource with a given name.
|
static Resource |
fromClasspath(String location)
Finds a resource with a given name.
|
static Resource |
fromString(String location,
String content)
Create a resource from a string.
|
InputStream |
getInputStream()
Returns an input stream that reads from the underlying resource.
|
String |
getLocation()
The location of the resource.
|
String getLocation()
InputStream getInputStream() throws IOException
InputStream
instance.IOException
static Resource fromClasspath(String location)
Class.getResourceAsStream(String)
static Resource fromClasspath(Class<?> type, String location)
Class.getResourceAsStream(String)
Apache Camel