public interface Resource
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Whether this resource exists..
|
InputStream |
getInputStream()
Returns an
InputStream that reads from the underlying resource. |
String |
getLocation()
The location of the resource.
|
default Reader |
getReader()
Returns a
Reader that reads from the underlying resource using UTF-8 as charset. |
default Reader |
getReader(Charset charset)
|
default URI |
getURI()
The
URI of the resource. |
default URL |
getURL()
The
URL for the resource or null if the URL can not be computed. |
String getLocation()
boolean exists()
default URI getURI()
URI of the resource.
The default implementation creates a URI object from resource location.default URL getURL() throws MalformedURLException
URL for the resource or null if the URL can not be computed.
The default implementation creates a URI object from resource location.MalformedURLExceptionInputStream getInputStream() throws IOException
InputStream that reads from the underlying resource.
Each invocation must return a new InputStream instance.IOExceptiondefault Reader getReader() throws Exception
Reader that reads from the underlying resource using UTF-8 as charset.
Each invocation must return a new Reader, @see #getInputStream()ExceptionApache Camel