Package org.scijava.io
Interface IOPlugin<D>
-
- All Superinterfaces:
Comparable<Prioritized>,Contextual,HandlerPlugin<Location>,HasPluginInfo,Identifiable,Locatable,Logged,Prioritized,RichPlugin,SciJavaPlugin,SingletonPlugin,Typed<Location>,TypedPlugin<Location>,Versioned
- All Known Implementing Classes:
AbstractIOPlugin,ScriptIOPlugin,TextIOPlugin
public interface IOPlugin<D> extends HandlerPlugin<Location>
A plugin which extends an application's I/O capabilities.I/O plugins discoverable at runtime must implement this interface and be annotated with @
Pluginwith attributePlugin.type()=IOPlugin.class. While it possible to create an I/O plugin merely by implementing this interface, it is encouraged to instead extendAbstractIOPlugin, for convenience.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Class<D>getDataType()The type of data opened and/or saved by the plugin.default Class<Location>getType()Gets the type associated with the object.default Dopen(String source)Opens data from the given source.default Dopen(Location source)Opens data from the given location.default voidsave(D data, String destination)Saves the given data to the specified destination.default voidsave(D data, Location destination)Saves the given data to the specified location.default booleansupports(String descriptor)default booleansupportsOpen(String source)Checks whether the I/O plugin can open data from the given source.default booleansupportsOpen(Location source)Checks whether the I/O plugin can open data from the given location.default booleansupportsSave(Object data, String destination)Checks whether the I/O plugin can save the given data to the specified location.default booleansupportsSave(Object data, Location destination)default booleansupportsSave(String destination)Checks whether the I/O plugin can save data to the given destination.default booleansupportsSave(Location destination)Checks whether the I/O plugin can save data to the given location.-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
supportsOpen
default boolean supportsOpen(String source)
Checks whether the I/O plugin can open data from the given source.
-
supportsOpen
default boolean supportsOpen(Location source)
Checks whether the I/O plugin can open data from the given location.
-
supportsSave
default boolean supportsSave(String destination)
Checks whether the I/O plugin can save data to the given destination.
-
supportsSave
default boolean supportsSave(Location destination)
Checks whether the I/O plugin can save data to the given location.
-
supportsSave
default boolean supportsSave(Object data, String destination)
Checks whether the I/O plugin can save the given data to the specified location.
-
open
default D open(String source) throws IOException
Opens data from the given source.- Throws:
IOException
-
open
default D open(Location source) throws IOException
Opens data from the given location.- Throws:
IOException
-
save
default void save(D data, String destination) throws IOException
Saves the given data to the specified destination.- Throws:
IOException
-
save
default void save(D data, Location destination) throws IOException
Saves the given data to the specified location.- Throws:
IOException
-
supports
default boolean supports(String descriptor)
-
-