CharsetDetector


@UnstableApi
public interface CharsetDetector


Detects the character encoding of subtitle byte data.

Summary

Public methods

abstract @Nullable Charset
detect(byte[] data, int offset, int length)

Detects the character encoding of the requested range of data.

Public methods

detect

abstract @Nullable Charset detect(byte[] data, int offset, int length)

Detects the character encoding of the requested range of data.

The requested range is not guaranteed to contain a complete subtitle file.

Parameters
byte[] data

The subtitle byte data.

int offset

The start offset in data.

int length

The number of bytes to inspect.

Returns
@Nullable Charset

The detected character encoding, or null if it could not be determined.