public interface IOService extends HandlerService<Location,IOPlugin<?>>, SciJavaService
| Modifier and Type | Method and Description |
|---|---|
default IOPlugin<?> |
getOpener(Location source)
Gets the most appropriate
IOPlugin for opening data from the given
location. |
default IOPlugin<?> |
getOpener(String source)
Gets the most appropriate
IOPlugin for opening data from the given
location. |
default Class<IOPlugin<?>> |
getPluginType()
Gets the type of plugins managed by this service.
|
default <D> IOPlugin<D> |
getSaver(D data,
Location destination)
Gets the most appropriate
IOPlugin for saving data to the given
location. |
default <D> IOPlugin<D> |
getSaver(D data,
String destination)
Gets the most appropriate
IOPlugin for saving data to the given
location. |
default Class<Location> |
getType()
Gets the type associated with the object.
|
default Object |
open(Location source)
Loads data from the given location.
|
Object |
open(String source)
Loads data from the given source.
|
default void |
save(Object data,
Location destination)
Saves data to the given location.
|
void |
save(Object data,
String destination)
Saves data to the given destination.
|
getHandler, getInstances, supportscreate, filterInstances, getInstance, initialize, objectServicefindgetPlugins, getPluginService, pluginServiceregisterEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersiondisposedefault IOPlugin<?> getOpener(String source)
IOPlugin for opening data from the given
location.default IOPlugin<?> getOpener(Location source)
IOPlugin for opening data from the given
location.default <D> IOPlugin<D> getSaver(D data, String destination)
IOPlugin for saving data to the given
location.default <D> IOPlugin<D> getSaver(D data, Location destination)
IOPlugin for saving data to the given
location.Object open(String source) throws IOException
The opener to use is automatically determined based on available
IOPlugins; 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.default Object open(Location source) throws IOException
The opener to use is automatically determined based on available
IOPlugins; see getOpener(Location).
source - The location 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
IOPlugins; 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.default void save(Object data, Location destination) throws IOException
The saver to use is automatically determined based on available
IOPlugins; see getSaver(Object, Location).
data - The data to be saved to the destination.destination - The destination location to which data should be saved.IOException - if something goes wrong saving the data.default Class<IOPlugin<?>> getPluginType()
PTServicegetPluginType in interface PTService<IOPlugin<?>>Copyright © 2015–2022 SciJava. All rights reserved.