org.sapia.resource
Interface Resource

All Known Implementing Classes:
FileResource, StringResource, UrlResource

public interface Resource

Abstracts a file resource.

Author:
Yanick Duchesne

Method Summary
 InputStream getInputStream()
           
 Resource getRelative(String uri)
           
 String getURI()
           
 long lastModified()
           
 

Method Detail

lastModified

long lastModified()
Returns:
the time, in millis, at which this resource was last modified.

getURI

String getURI()
Returns:
the URI that this resource corresponds to.

getInputStream

InputStream getInputStream()
                           throws IOException
Returns:
the InputStream corresponding to this resource.
Throws:
IOException

getRelative

Resource getRelative(String uri)
                     throws IOException
Parameters:
uri - a URI.
Returns:
the Resource corresponding to the given relative URI.
Throws:
IOException


Copyright © 2007 Sapia Open Community, Inc. All Rights Reserved.