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.
|
context, getContext, setContext
getPriority, setPriority
compareTo
getInfo, setInfo
boolean supportsOpen(String source)
boolean supportsSave(String destination)
boolean supportsSave(Object data, String destination)
D open(String source) throws IOException
IOException
void save(D data, String destination) throws IOException
IOException
Copyright © 2009–2015 SciJava. All rights reserved.