public class FilesystemResource extends AbstractFilteredResource
Constructor and Description |
---|
FilesystemResource(String resourcePath)
Constructor.
|
FilesystemResource(String resourcePath,
ResourceFilter resourceFilter)
Deprecated.
|
FilesystemResource(URI resourceURI)
Constructor.
|
FilesystemResource(URI resourceURI,
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 FilesystemResource(String resourcePath) throws ResourceException
resourcePath
- the path to the file for this resourceResourceException
- thrown if the resource path is null or emptypublic FilesystemResource(URI resourceURI) throws ResourceException
resourceURI
- file: URI to the fileResourceException
- thrown if the resource path is null or emptypublic FilesystemResource(String resourcePath, ResourceFilter resourceFilter) throws ResourceException
AbstractFilteredResource.setResourceFilter(ResourceFilter)
insteadresourcePath
- the path to the file for this resourceresourceFilter
- filter to apply to this resourceResourceException
- thrown if the resource path is null or emptypublic FilesystemResource(URI resourceURI, ResourceFilter resourceFilter) throws ResourceException
AbstractFilteredResource.setResourceFilter(ResourceFilter)
insteadresourceURI
- the file: URI to the file for this resourceresourceFilter
- filter to apply to this resourceResourceException
- thrown if the resource path is null or emptypublic 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.