public final class DefaultIOService extends AbstractHandlerService<Location,IOPlugin<?>> implements IOService
IOService
.Constructor and Description |
---|
DefaultIOService() |
Modifier and Type | Method and Description |
---|---|
Object |
open(Location source)
Loads data from the given location.
|
Object |
open(String source)
Loads data from the given source.
|
void |
save(Object data,
Location destination)
Saves data to the given location.
|
void |
save(Object data,
String destination)
Saves data to the given destination.
|
getInstance, getInstances, objectService, onEvent, onEvent
pluginService
getContext, setContext, toString
getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOpener, getOpener, getPluginType, getSaver, getSaver, getType
getHandler, getInstances, supports
create, filterInstances, getInstance, initialize, objectService
find
getPlugins, getPluginService, pluginService
registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
public Object open(String source) throws IOException
IOService
The opener to use is automatically determined based on available
IOPlugin
s; see IOService.getOpener(String)
.
open
in interface IOService
source
- The source (e.g., file path) from which to data should be
loaded.IOException
- if something goes wrong loading the data.public void save(Object data, String destination) throws IOException
IOService
The saver to use is automatically determined based on available
IOPlugin
s; see IOService.getSaver(Object, String)
.
save
in interface IOService
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.public Object open(Location source) throws IOException
IOService
The opener to use is automatically determined based on available
IOPlugin
s; see IOService.getOpener(Location)
.
open
in interface IOService
source
- The location from which to data should be loaded.IOException
- if something goes wrong loading the data.public void save(Object data, Location destination) throws IOException
IOService
The saver to use is automatically determined based on available
IOPlugin
s; see IOService.getSaver(Object, Location)
.
save
in interface IOService
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.Copyright © 2015–2022 SciJava. All rights reserved.