public class ClasspathResource extends AbstractFilteredResource
ClasspathResource
is created and is never changed.Constructor and Description |
---|
ClasspathResource(String path)
Constructor.
|
ClasspathResource(String path,
ResourceFilter resourceFilter)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
boolean |
exists()
Checks whether the resource exists.
|
InputStream |
getInputStream()
Gets the inputstream to the resource's data.
|
org.joda.time.DateTime |
getLastModifiedTime()
Gets the date and time the resource was last modified.
|
String |
getLocation()
Gets resource location information.
|
int |
hashCode() |
String |
toString() |
applyFilter, getResourceFilter, setResourceFilter
public ClasspathResource(String path) throws ResourceException
path
- the path to the file for this resourceResourceException
- thrown if the resource path is null or empty or if the resource does not existpublic ClasspathResource(String path, ResourceFilter resourceFilter) throws ResourceException
AbstractFilteredResource.setResourceFilter(ResourceFilter)
insteadpath
- the path to the file for this resourceresourceFilter
- filter to apply to this resourceResourceException
- thrown if the resource path is null or empty or if the resource does not existpublic boolean exists() throws ResourceException
ResourceException
- thrown if there is a problem determining if the resource existspublic InputStream getInputStream() throws ResourceException
ResourceException
- thrown if an input stream can not be created for the resourcepublic org.joda.time.DateTime getLastModifiedTime() throws ResourceException
ResourceException
- thrown if the last modified time can not be determinedpublic String getLocation()
Copyright © 2018 JBoss by Red Hat. All rights reserved.