public interface Checker extends HasFormat
Checker components are used to determine if the Format they
are associated with is compatibile with a given image. This is accomplished
via the isFormat(org.scijava.io.location.Location) methods.
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkHeader(byte[] block)
Checks if the given bytes are a valid header for this
Format. |
boolean |
isFormat(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream)
Checks if the given stream is a valid stream for this
Format. |
boolean |
isFormat(org.scijava.io.location.Location loc)
Checks if the provided image source is compatible with this
Format. |
boolean |
isFormat(org.scijava.io.location.Location loc,
SCIFIOConfig config)
Checks if the provided image source is compatible with this
Format. |
boolean |
suffixNecessary()
Whether the file extension matching one of the format's suffixes is
necessary to identify the file as a source compatible with this format.
|
boolean |
suffixSufficient()
Whether the file extension matching one of the format's suffixes is
sufficient to identify the file as a source compatible with this format.
|
getFormat, getFormatNamegetVersion, loggetIdentifiercontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationboolean suffixNecessary()
boolean suffixSufficient()
If false, the source will have to be read to determine compatibility.
boolean isFormat(org.scijava.io.location.Location loc)
Format.
Will not open the source during this process.loc - path to the image source to check.Format.boolean isFormat(org.scijava.io.location.Location loc, SCIFIOConfig config)
Format.
If open is true and the source name is insufficient to determine
the image type, the source may be opened for further analysis, or other
relatively expensive file system operations (such as file existence tests
and directory listings) may be performed.
loc - path to the image source to check.config - SCIFIOConfig for this isFormat call.Format.boolean isFormat(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream) throws IOException
Format.stream - the image source to check.stream is compatible with this Format.IOExceptionboolean checkHeader(byte[] block)
Format.block - the byte array to check.block is compatible with this Format.Copyright © 2011–2026 SCIFIO. All rights reserved.