public abstract class FormatHandler extends Object implements IFormatHandler
Modifier and Type | Field and Description |
---|---|
static String[] |
COMPRESSION_SUFFIXES
Suffixes for supported compression types.
|
protected String |
currentId
Name of current file.
|
protected String |
format
Name of this file format.
|
protected static org.slf4j.Logger |
LOGGER |
protected String[] |
suffixes
Valid suffixes for this file format.
|
Constructor and Description |
---|
FormatHandler(String format,
String suffix)
Constructs a format handler with the given name and default suffix.
|
FormatHandler(String format,
String[] suffixes)
Constructs a format handler with the given name and default suffixes.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkSuffix(String name,
String suffix)
Performs suffix matching for the given filename.
|
static boolean |
checkSuffix(String name,
String[] suffixList)
Performs suffix matching for the given filename.
|
String |
getFormat()
Gets the name of this file format.
|
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) . |
String[] |
getSuffixes()
Gets the default file suffixes for this file format.
|
boolean |
isThisType(String name)
Checks if a file matches the type of this format handler.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setId
protected static final org.slf4j.Logger LOGGER
public static final String[] COMPRESSION_SUFFIXES
protected String format
protected String[] suffixes
protected String currentId
public FormatHandler(String format, String suffix)
public boolean isThisType(String name)
isThisType
in interface IFormatHandler
public String getFormat()
IFormatHandler
getFormat
in interface IFormatHandler
public String[] getSuffixes()
IFormatHandler
getSuffixes
in interface IFormatHandler
public 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(String name, String suffix)
Copyright © 2016 Open Microscopy Environment