Package com.globalmentor.net
Interface ResourceSelector<R extends Resource>
- Type Parameters:
R
- The type of resource being selected.
- All Superinterfaces:
Preferencesable
,URIAccessible
,URIInputStreamable
,URIOutputStreamable
An interface to an object that allows resources to be selected for input or output.
- Author:
- Garret Wilson
-
Method Summary
Modifier and TypeMethodDescriptiongetResource
(URI referenceURI) Retrieves a description of the resource with the given reference URI.selectInputResource
(R oldResource) Selects a resource for input.selectOutputResource
(R oldResource) Selects a resource for output.Methods inherited from interface com.globalmentor.util.prefs.Preferencesable
getPreferences, setPreferences
Methods inherited from interface com.globalmentor.io.URIInputStreamable
getInputStream
Methods inherited from interface com.globalmentor.io.URIOutputStreamable
getOutputStream
-
Method Details
-
getResource
Retrieves a description of the resource with the given reference URI.- Parameters:
referenceURI
- The reference URI of the resource in question.- Returns:
- A description of the identified resource.
- Throws:
IOException
- Thrown if there is an error retrieving the resource description.
-
selectInputResource
Selects a resource for input.- Parameters:
oldResource
- The currently selected resource, if applicable, ornull
if there is no selected resource.- Returns:
- The selected resource, or
null
if selection was canceled. - Throws:
SecurityException
- Thrown if selecting an input resource is not allowed.IOException
- Thrown if there is an error locating a resource.
-
selectOutputResource
Selects a resource for output.- Parameters:
oldResource
- The currently selected resource, if applicable, ornull
if there is no selected resource.- Returns:
- The selected resource, or
null
if selection was canceled. - Throws:
SecurityException
- Thrown if selecting an output resource is not allowed.IOException
- Thrown if there is an error locating a resource.
-