KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > resource > Resource


1 package org.sapia.resource;
2
3 import java.io.IOException JavaDoc;
4 import java.io.InputStream JavaDoc;
5
6 /**
7  * Abstracts a file resource.
8  *
9  * @author Yanick Duchesne
10  *
11  */

12 public interface Resource {
13   /**
14    * @return the time, in <code>millis</code>, at which this resource was
15    * last modified.
16    */

17   public long lastModified();
18
19   /**
20    * @return the URI that this resource corresponds to.
21    */

22   public String JavaDoc getURI();
23
24   /**
25    * @return the <code>InputStream</code> corresponding to this resource.
26    * @throws IOException
27    */

28   public InputStream JavaDoc getInputStream() throws IOException JavaDoc;
29   
30   
31   /**
32    * @return the <code>Resource</code> corresponding to the given relative URI.
33    * @param uri a URI.
34    * @throws IOException
35    */

36   public Resource getRelative(String JavaDoc uri) throws IOException JavaDoc;
37   
38 }
39
Popular Tags