CodecParameters


@UnstableApi
public final class CodecParameters


An immutable collection of parameters to be applied to a codec.

Summary

Nested types

public final class CodecParameters.Builder

A builder for CodecParameters instances.

Constants

static final CodecParameters

An empty CodecParameters instance.

Public methods

CodecParameters.Builder

Returns a new Builder initialized with the values of this instance.

boolean
@Nullable Object
get(String key)

Retrieves a parameter value by its key.

int
Set<String>

Returns a Set of the keys contained in this instance.

Constants

EMPTY

public static final CodecParameters EMPTY

An empty CodecParameters instance.

Public methods

buildUpon

public CodecParameters.Builder buildUpon()

Returns a new Builder initialized with the values of this instance.

equals

public boolean equals(@Nullable Object obj)

get

public @Nullable Object get(String key)

Retrieves a parameter value by its key.

Note: If the returned value is a ByteBuffer, it must be treated as read-only. Modifying the returned ByteBuffer will affect this CodecParameters instance and may lead to unexpected behavior.

Parameters
String key

A string representing the key of the codec parameter.

Returns
@Nullable Object

The value of the requested parameter, or null if the key is not present.

hashCode

public int hashCode()

keySet

public Set<StringkeySet()

Returns a Set of the keys contained in this instance.