SubtitleDecoderFactory


@UnstableApi
public interface SubtitleDecoderFactory


A factory for SubtitleDecoder instances.

Summary

Constants

default static final SubtitleDecoderFactory

Default SubtitleDecoderFactory implementation.

Public methods

abstract SubtitleDecoder

Creates a SubtitleDecoder for the given Format.

abstract boolean

Returns whether the factory is able to instantiate a SubtitleDecoder for the given Format.

Constants

DEFAULT

default static final SubtitleDecoderFactory DEFAULT

Default SubtitleDecoderFactory implementation.

Supports formats supported by DefaultSubtitleParserFactory as well as the following:

Public methods

createDecoder

abstract SubtitleDecoder createDecoder(Format format)

Creates a SubtitleDecoder for the given Format.

Parameters
Format format

The Format.

Throws
java.lang.IllegalArgumentException

If the Format is not supported.

supportsFormat

abstract boolean supportsFormat(Format format)

Returns whether the factory is able to instantiate a SubtitleDecoder for the given Format.

Parameters
Format format

The Format.

Returns
boolean

Whether the factory can instantiate a suitable SubtitleDecoder.