public final class ResourceSource extends AbstractSource
| Modifier and Type | Field and Description |
|---|---|
private static Logger |
__LOGGER |
private URL |
_location
Location of the resource
|
private String |
_mimeType |
private String |
_path |
| Constructor and Description |
|---|
ResourceSource(String systemId)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists() |
private ClassLoader |
getClassLoader() |
protected void |
getInfos() |
InputStream |
getInputStream()
Return an
InputStream object to read from the source. |
String |
getMimeType() |
SourceValidity |
getValidity()
Returns
NOPValidity.SHARED_INSTANCEsince a resource doesn't
change. |
checkInfos, getContentLength, getLastModified, getScheme, getURI, refresh, setContentLength, setLastModified, setScheme, setSystemIdpublic ResourceSource(String systemId) throws MalformedURLException, SourceNotFoundException
systemId - URI of the desired resourceMalformedURLException - if the systemId is not like <scheme>://<path>SourceNotFoundException - if the location can not be found in the class loaderpublic boolean exists()
protected void getInfos()
getInfos in class AbstractSourcepublic String getMimeType()
getMimeType in interface SourcegetMimeType in class AbstractSourcepublic InputStream getInputStream() throws IOException
InputStream object to read from the source.getInputStream in interface SourcegetInputStream in class AbstractSourceIOExceptionpublic SourceValidity getValidity()
NOPValidity.SHARED_INSTANCEsince a resource doesn't
change.getValidity in interface SourcegetValidity in class AbstractSourceprivate ClassLoader getClassLoader()