public abstract class AbstractTypedIOService<D> extends AbstractHandlerService<Location,IOPlugin<D>> implements TypedIOService<D>
IOPlugins.| Constructor and Description |
|---|
AbstractTypedIOService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canOpen(Location source) |
boolean |
canOpen(String source) |
boolean |
canSave(D data,
Location destination) |
boolean |
canSave(D data,
String source) |
protected IOService |
ioService() |
protected LocationService |
locationService() |
D |
open(Location source)
Loads data from the given location.
|
D |
open(String source)
Loads data from the given source.
|
void |
save(D data,
Location destination)
Saves data to the given location.
|
void |
save(D data,
String destination)
Saves data to the given destination.
|
getInstance, getInstances, objectService, onEvent, onEventpluginServicegetContext, setContext, toStringgetInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetOpener, getOpener, getPluginType, getSaver, getSaver, getTypegetHandler, getInstances, supportscreate, filterInstances, getInstance, initialize, objectServicefindgetPlugins, getPluginService, pluginServiceregisterEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersiondisposepublic D open(String source) throws IOException
TypedIOService
The opener to use is automatically determined based on available
IOPlugins; see TypedIOService.getOpener(String).
open in interface TypedIOService<D>source - The source (e.g., file path) from which to data should be
loaded.IOException - if something goes wrong loading the data.public D open(Location source) throws IOException
TypedIOService
The opener to use is automatically determined based on available
IOPlugins; see TypedIOService.getOpener(Location).
open in interface TypedIOService<D>source - The location from which to data should be loaded.IOException - if something goes wrong loading the data.public void save(D data, String destination) throws IOException
TypedIOService
The saver to use is automatically determined based on available
IOPlugins; see TypedIOService.getSaver(Object, String).
save in interface TypedIOService<D>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 void save(D data, Location destination) throws IOException
TypedIOService
The saver to use is automatically determined based on available
IOPlugins; see TypedIOService.getSaver(Object, Location).
save in interface TypedIOService<D>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.public boolean canOpen(String source)
canOpen in interface TypedIOService<D>public boolean canOpen(Location source)
canOpen in interface TypedIOService<D>public boolean canSave(D data, String source)
canSave in interface TypedIOService<D>public boolean canSave(D data, Location destination)
canSave in interface TypedIOService<D>protected LocationService locationService()
protected IOService ioService()
Copyright © 2015–2022 SciJava. All rights reserved.