public interface IOPlugin<D> extends HandlerPlugin<String>
I/O plugins discoverable at runtime must implement this interface and be
annotated with @Plugin with attribute Plugin.type() =
IOPlugin.class. While it possible to create an I/O plugin merely by
implementing this interface, it is encouraged to instead extend
AbstractIOPlugin, for convenience.
| Modifier and Type | Method and Description |
|---|---|
Class<D> |
getDataType()
The type of data opened and/or saved by the plugin.
|
D |
open(String source)
Opens data from the given source.
|
void |
save(D data,
String destination)
Saves the given data to the specified destination.
|
boolean |
supportsOpen(String source)
Checks whether the I/O plugin can open data from the given source.
|
boolean |
supportsSave(Object data,
String destination)
Checks whether the I/O plugin can save the given data to the specified
destination.
|
boolean |
supportsSave(String destination)
Checks whether the I/O plugin can save data to the given destination.
|
getIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersionboolean supportsOpen(String source)
boolean supportsSave(String destination)
boolean supportsSave(Object data, String destination)
D open(String source) throws IOException
IOExceptionvoid save(D data, String destination) throws IOException
IOExceptionCopyright © 2009–2016 SciJava. All rights reserved.