org.opensaml.util.resource
Interface Resource

All Known Implementing Classes:
AbstractFilteredResource, ClasspathResource, FileBackedHttpResource, FilesystemResource, HttpResource

public interface Resource

An interface representing an data resource.


Method Summary
 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.
 

Method Detail

getLocation

String getLocation()
Gets resource location information. Examples might be filesystem path, URL, etc.

Returns:
resource location information

exists

boolean exists()
               throws ResourceException
Checks whether the resource exists.

Returns:
true if the resource exists, false if not
Throws:
ResourceException - thrown if there is a problem determining if the resource exists

getInputStream

InputStream getInputStream()
                           throws ResourceException
Gets the inputstream to the resource's data.

Returns:
inputstream to the resource's data
Throws:
ResourceException - thrown if an input stream can not be created for the resource

getLastModifiedTime

org.joda.time.DateTime getLastModifiedTime()
                                           throws ResourceException
Gets the date and time the resource was last modified.

Returns:
date and time the resource was last modified
Throws:
ResourceException - thrown if the last modified time can not be determined


Copyright © 2006-2013 Internet2. All Rights Reserved.