public class ClasspathResource extends AbstractResource
| Modifier and Type | Field and Description |
|---|---|
private URL |
classpathResource
URL to the classpath resource.
|
| Constructor and Description |
|---|
ClasspathResource(String resourcePath)
Constructor.
|
ClasspathResource(String resourcePath,
ClassLoader classLoader)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doExists()
Checks whether the resource exists.
|
protected InputStream |
doGetInputStream()
Gets the input stream to the resource's data.
|
protected long |
doGetLastModifiedTime()
Gets the time, in milliseconds since the epoch, when the resource was last modified.
|
doValidate, equals, exists, getInputStream, getLastModifiedTime, getLocation, hashCode, setLocation, toString, validatedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, isDestroyedinitialize, isInitializedprivate final URL classpathResource
public ClasspathResource(String resourcePath)
resourcePath - classpath path to the resourcepublic ClasspathResource(String resourcePath, ClassLoader classLoader)
resourcePath - classpath path to the resourceclassLoader - class loader used to locate the resourceprotected boolean doExists()
throws ResourceException
doExists in class AbstractResourceResourceException - thrown if there is a problem determining if the resource existsprotected InputStream doGetInputStream() throws ResourceException
doGetInputStream in class AbstractResourceResourceException - thrown if an input stream can not be created for the resourceprotected long doGetLastModifiedTime()
throws ResourceException
doGetLastModifiedTime in class AbstractResourceResourceException - thrown if the last modified time can not be determinedCopyright © 1999-2013. All Rights Reserved.