Class DecoderFactory
java.lang.Object
is.galia.codec.DecoderFactory
-
Method Summary
Modifier and TypeMethodDescriptionstatic DecodernewDecoder(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
Decoderimplementation 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
DecoderConfigurationExceptionis thrown.
- If multiple
Decoderimplementations exist that support the format, theKey.DECODER_FORMATSkey in the application configuration is consulted to choose one.- If it is not set, a
SourceFormatExceptionis thrown. - If it maps to a valid implementation, an instance of that implementation is returned.
- If it maps to an invalid implementation, a
DecoderConfigurationExceptionis thrown.
- If it is not set, a
- If no
Decoderimplementation exists that supports the format, aSourceFormatExceptionis 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
-