|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.resource.UrlResourceHandler
public class UrlResourceHandler
Implements a ResourceHandler that produces
UrlResource instances.
UrlResource| Constructor Summary | |
|---|---|
UrlResourceHandler()
|
|
| Method Summary | |
|---|---|
boolean |
accepts(java.lang.String uri)
Returns true if this handler "recognizes" resources with the
given URI. |
boolean |
accepts(java.net.URI uri)
|
java.io.InputStream |
getResource(java.lang.String uri)
Returns the stream corresponding to the given URI. |
Resource |
getResourceObject(java.lang.String uri)
Returns the resource object corresponding to the given URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UrlResourceHandler()
| Method Detail |
|---|
public Resource getResourceObject(java.lang.String uri)
throws java.io.IOException
ResourceHandler
getResourceObject in interface ResourceHandleruri - a URI.
Resource.
java.io.IOException - if a problem occurs.
public java.io.InputStream getResource(java.lang.String uri)
throws java.io.IOException
ResourceHandler
getResource in interface ResourceHandleruri - a URI.
InputStream.
ResourceNotFoundException - if a resource corresponding to the
URI could does not exist.
java.io.IOException - if a problem occurs.public boolean accepts(java.lang.String uri)
ResourceHandlertrue if this handler "recognizes" resources with the
given URI. This methods is used to hold resource handlers in a chain of
responsability.
accepts in interface ResourceHandleruri - a URI.
true if this handler can handle resources with the
given URI.public boolean accepts(java.net.URI uri)
accepts in interface ResourceHandleruri - a URI.
true if this handler can handle resources with the
given URI.ResourceHandler.accepts(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||