public abstract class FormatHandler extends java.lang.Object implements IFormatHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
COMPRESSION_SUFFIXES
Suffixes for supported compression types.
|
protected java.lang.String |
currentId
Name of current file.
|
protected java.lang.String |
format
Name of this file format.
|
protected static org.slf4j.Logger |
LOGGER |
protected MetadataOptions |
metadataOptions
Metadata parsing options.
|
protected java.lang.String[] |
suffixes
Valid suffixes for this file format.
|
Constructor and Description |
---|
FormatHandler(java.lang.String format,
java.lang.String suffix)
Constructs a format handler with the given name and default suffix.
|
FormatHandler(java.lang.String format,
java.lang.String[] suffixes)
Constructs a format handler with the given name and default suffixes.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkSuffix(java.lang.String name,
java.lang.String suffix)
Performs suffix matching for the given filename.
|
static boolean |
checkSuffix(java.lang.String name,
java.lang.String[] suffixList)
Performs suffix matching for the given filename.
|
java.lang.String |
getFormat()
Gets the name of this file format.
|
MetadataOptions |
getMetadataOptions() |
java.lang.Class<?> |
getNativeDataType()
Returns the native data type of image planes for this reader, as returned
by
IFormatReader.openPlane(int, int, int, int, int) or IFormatWriter.savePlane(int, java.lang.Object) . |
java.lang.String[] |
getSuffixes()
Gets the default file suffixes for this file format.
|
java.util.Set<MetadataLevel> |
getSupportedMetadataLevels() |
boolean |
isThisType(java.lang.String name)
Checks if a file matches the type of this format handler.
|
void |
setMetadataOptions(MetadataOptions options) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setId
protected static final org.slf4j.Logger LOGGER
public static final java.lang.String[] COMPRESSION_SUFFIXES
protected java.lang.String format
protected java.lang.String[] suffixes
protected java.lang.String currentId
protected MetadataOptions metadataOptions
public FormatHandler(java.lang.String format, java.lang.String suffix)
public FormatHandler(java.lang.String format, java.lang.String[] suffixes)
public java.util.Set<MetadataLevel> getSupportedMetadataLevels()
getSupportedMetadataLevels
in interface IMetadataConfigurable
public MetadataOptions getMetadataOptions()
getMetadataOptions
in interface IMetadataConfigurable
public void setMetadataOptions(MetadataOptions options)
setMetadataOptions
in interface IMetadataConfigurable
public boolean isThisType(java.lang.String name)
isThisType
in interface IFormatHandler
public java.lang.String getFormat()
IFormatHandler
getFormat
in interface IFormatHandler
public java.lang.String[] getSuffixes()
IFormatHandler
getSuffixes
in interface IFormatHandler
public java.lang.Class<?> getNativeDataType()
IFormatHandler
IFormatReader.openPlane(int, int, int, int, int)
or IFormatWriter.savePlane(int, java.lang.Object)
.
For most readers this type will be a byte array; however, some readers
call external APIs that work with other types such as
BufferedImage
.getNativeDataType
in interface IFormatHandler
public static boolean checkSuffix(java.lang.String name, java.lang.String suffix)
public static boolean checkSuffix(java.lang.String name, java.lang.String[] suffixList)
Copyright © 2020 Open Microscopy Environment