|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface URIHandler
A handler for determining information about URI.
A URI handler is used primarily by a URI converter
which provides support for accessing and querying the contents of a URI
by virtue of having a list
of URI handlers
that it consults to determine whether the handler can handle
the given URI and if so
that it uses as a delegate.
URIConverter
,
ContentHandler
Field Summary | |
---|---|
static java.util.List<URIHandler> |
DEFAULT_HANDLERS
The global default read only list of URI handlers. |
Method Summary | |
---|---|
boolean |
canHandle(URI uri)
Returns whether this handler is appropriate for the given URI. |
java.util.Map<java.lang.String,?> |
contentDescription(URI uri,
java.util.Map<?,?> options)
Returns a map from String properties to their corresponding values representing a description the given URI's contents. |
java.io.InputStream |
createInputStream(URI uri,
java.util.Map<?,?> options)
Creates an input stream for the URI and returns it. |
java.io.OutputStream |
createOutputStream(URI uri,
java.util.Map<?,?> options)
Creates an output stream for the URI and returns it. |
void |
delete(URI uri,
java.util.Map<?,?> options)
Deletes the contents of the given URI. |
boolean |
exists(URI uri,
java.util.Map<?,?> options)
Returns whether the given URI has contents. |
java.util.Map<java.lang.String,?> |
getAttributes(URI uri,
java.util.Map<?,?> options)
Returns a map from String attributes to their corresponding values representing information about various aspects of the URI's state. |
void |
setAttributes(URI uri,
java.util.Map<java.lang.String,?> attributes,
java.util.Map<?,?> options)
Updates the map from String attributes to their corresponding values representing information about various aspects of the URI's state. |
Field Detail |
---|
static final java.util.List<URIHandler> DEFAULT_HANDLERS
Method Detail |
---|
boolean canHandle(URI uri)
uri
- the URI to consider.
java.io.InputStream createInputStream(URI uri, java.util.Map<?,?> options) throws java.io.IOException
uri
- the URI for which to create the input stream.options
- a map of options to influence the kind of stream that is returned; unrecognized options are ignored and null
is permitted.
java.io.IOException
- if there is a problem obtaining an open input stream.URIConverter.createInputStream(URI, Map)
java.io.OutputStream createOutputStream(URI uri, java.util.Map<?,?> options) throws java.io.IOException
uri
- the URI for which to create the output stream.options
- a map of options to influence the kind of stream that is returned; unrecognized options are ignored and null
is permitted.
java.io.IOException
- if there is a problem obtaining an open output stream.URIConverter.createOutputStream(URI, Map)
void delete(URI uri, java.util.Map<?,?> options) throws java.io.IOException
uri
- the URI to consider.options
- options to influence how the contents are deleted.
java.io.IOException
- if there is a problem deleting the contents.URIConverter.delete(URI, Map)
java.util.Map<java.lang.String,?> contentDescription(URI uri, java.util.Map<?,?> options) throws java.io.IOException
content handler
for more details.
uri
- the URI to consider.options
- options to influence how the content description is determined.
java.io.IOException
- if there is a problem accessing the contents.URIConverter.contentDescription(URI, Map)
,
ContentHandler.contentDescription(URI, InputStream, Map, Map)
boolean exists(URI uri, java.util.Map<?,?> options)
exists
it will be possible to create
an input stream.
uri
- the URI to consider.options
- options to influence how the existence determined.
URIConverter.exists(URI, Map)
java.util.Map<java.lang.String,?> getAttributes(URI uri, java.util.Map<?,?> options)
requested attributes option
can be used to specify which properties to fetch;
without that option, all supported attributes will be fetched.
If the URI doesn't not support any particular attribute, an entry for that attribute will not be appear in the result.
uri
- the URI to consider.options
- options to influence how the attributes are determined.
void setAttributes(URI uri, java.util.Map<java.lang.String,?> attributes, java.util.Map<?,?> options) throws java.io.IOException
uri
- the URI to consider.attributes
- the new values for the attributes.options
- options to influence how the attributes are updated.
java.io.IOException
- if there is a problem updating the attributes.
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |