Package org.scijava.io.handle
Interface DataHandleService
-
- All Superinterfaces:
Comparable<Prioritized>,Contextual,Disposable,HasPluginInfo,Identifiable,Initializable,Locatable,Logged,Prioritized,PTService<DataHandle<Location>>,RichPlugin,SciJavaPlugin,SciJavaService,Service,Typed<Location>,TypedService<Location,DataHandle<Location>>,Versioned,WrapperService<Location,DataHandle<Location>>
- All Known Implementing Classes:
DefaultDataHandleService
public interface DataHandleService extends WrapperService<Location,DataHandle<Location>>, SciJavaService
Interface for low-level data I/O: reading and writing bytes usingDataHandles.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default booleanexists(Location location)Convenience method to test whether it describes an existing file.default Class<DataHandle<Location>>getPluginType()Gets the type of plugins managed by this service.default Class<Location>getType()Gets the type associated with the object.default DataHandle<Location>readBuffer(DataHandle<Location> handle)Wraps the providedDataHandlein a read-only buffer for accelerated reading.default DataHandle<Location>readBuffer(Location location)Creates aDataHandleon the providedLocationwrapped in a read-only buffer for accelerated reading.default DataHandle<Location>writeBuffer(DataHandle<Location> handle)Wraps the providedDataHandlein a write-only buffer for accelerated writing.-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
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.PTService
create, getPlugins, getPluginService, pluginService
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.service.Service
registerEventHandlers
-
Methods inherited from interface org.scijava.plugin.TypedService
find
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
Methods inherited from interface org.scijava.plugin.WrapperService
create, initialize, supports
-
-
-
-
Method Detail
-
getPluginType
default Class<DataHandle<Location>> getPluginType()
Description copied from interface:PTServiceGets the type of plugins managed by this service.- Specified by:
getPluginTypein interfacePTService<DataHandle<Location>>
-
getType
default Class<Location> getType()
Description copied from interface:TypedGets the type associated with the object.
-
exists
default boolean exists(Location location) throws IOException
Convenience method to test whether it describes an existing file.- Parameters:
location- the location to test- Returns:
- The result of
DataHandle.exists()on a newly created handle on this location. Also returnsfalseif the handle can not be created. - Throws:
IOException- if the creation of the handle fails exceptionally
-
readBuffer
default DataHandle<Location> readBuffer(DataHandle<Location> handle)
Wraps the providedDataHandlein a read-only buffer for accelerated reading.- Parameters:
handle- the handle to wrap- Returns:
- The handle wrapped in a read-only buffer, or
nullif the input handle isnull - See Also:
ReadBufferDataHandle(DataHandle)
-
readBuffer
default DataHandle<Location> readBuffer(Location location)
Creates aDataHandleon the providedLocationwrapped in a read-only buffer for accelerated reading.- Parameters:
location- the Location to create a buffered handle on.- Returns:
- A
DataHandleon the provided location wrapped in a read-only buffer, ornullif no handle could be created for the location. - See Also:
ReadBufferDataHandle(DataHandle)
-
writeBuffer
default DataHandle<Location> writeBuffer(DataHandle<Location> handle)
Wraps the providedDataHandlein a write-only buffer for accelerated writing.- Parameters:
handle- the handle to wrap- Returns:
- the handle wrapped in a write-only buffer or
nullif the provided handle isnull - See Also:
WriteBufferDataHandle(DataHandle)
-
-