Class DecoderFactory
java.lang.Object
is.galia.codec.DecoderFactory
-
Method Summary
Modifier and TypeMethodDescriptionstatic Decoder
newDecoder
(Format format, Arena arena) Returns a new instance capable of decoding the given format.
-
Method Details
-
getAllDecoders
-
getAllSupportedFormats
-
getPluginDecoders
- Returns:
- Set of instances of all decoders provided by plugins. The
instances have not been
initialized
.
-
newDecoder
public static Decoder newDecoder(Format format, Arena arena) throws SourceFormatException, DecoderConfigurationException Returns a new instance capable of decoding the given format.
- If a single
Decoder
implementation exists that supports the format:- If there is no configuration preference, or if there is a matching configuration preference, an instance of that that implementation is returned.
- Otherwise, a
DecoderConfigurationException
is thrown.
- If multiple
Decoder
implementations exist that support the format, theKey.DECODER_FORMATS
key in the application configuration is consulted to choose one.- If it is not set, a
SourceFormatException
is thrown. - If it maps to a valid implementation, an instance of that implementation is returned.
- If it maps to an invalid implementation, a
DecoderConfigurationException
is thrown.
- If it is not set, a
- If no
Decoder
implementation exists that supports the format, aSourceFormatException
is thrown.
- Parameters:
format
- Format for which to retrieve an instance.arena
- Will be assigned to the instance beforePlugin.initializePlugin()
is called.- Returns:
- Instance capable of decoding the given format.
- Throws:
SourceFormatException
- if the given format is not supported by any decoder.DecoderConfigurationException
- if the configuration contains an invalid implementation name for the given format.
- If a single
-