public interface IOService extends HandlerService<String,IOPlugin<?>>, SciJavaService
DataHandleService
,
Location
Modifier and Type | Method and Description |
---|---|
IOPlugin<?> |
getOpener(String source)
Gets the most appropriate
IOPlugin for opening data from the given
source. |
<D> IOPlugin<D> |
getSaver(D data,
String destination)
Gets the most appropriate
IOPlugin for saving data to the given
destination. |
Object |
open(String source)
Loads data from the given source.
|
void |
save(Object data,
String destination)
Saves data to the given destination.
|
getHandler, getInstances, supports
getInstance
create, getPlugins, getPluginService, getPluginType
initialize, registerEventHandlers
context, getContext, setContext
getPriority, setPriority
compareTo
getInfo, setInfo
dispose
IOPlugin<?> getOpener(String source)
IOPlugin
for opening data from the given
source.<D> IOPlugin<D> getSaver(D data, String destination)
IOPlugin
for saving data to the given
destination.Object open(String source) throws IOException
The opener to use is automatically determined based on available
IOPlugin
s; see getOpener(String)
.
source
- The source (e.g., file path) from which to data should be
loaded.IOException
- if something goes wrong loading the data.void save(Object data, String destination) throws IOException
The saver to use is automatically determined based on available
IOPlugin
s; see getSaver(Object, String)
.
data
- The data to be saved to the destination.destination
- The destination (e.g., file path) to which data should
be saved.IOException
- if something goes wrong saving the data.Copyright © 2009–2015 SciJava. All rights reserved.