DrmInitData.SchemeData


public final class DrmInitData.SchemeData implements Parcelable


Scheme initialization data.

Summary

Public fields

final @Nullable byte[]

The initialization data.

final @Nullable String

The URL of the server to which license requests should be made.

final String

The mimeType of data.

final UUID

The UUID of the DRM scheme, or UUID_NIL if the data is universal (i.e. applies to all schemes).

Public constructors

SchemeData(UUID uuid, String mimeType, @Nullable byte[] data)
SchemeData(
    UUID uuid,
    @Nullable String licenseServerUrl,
    String mimeType,
    @Nullable byte[] data
)

Public methods

boolean

Returns whether this SchemeData can be used to replace other.

DrmInitData.SchemeData
copyWithData(@Nullable byte[] data)

Returns a copy of this instance with the specified data.

int
boolean
boolean

Returns whether data is non-null.

int
boolean
matches(UUID schemeUuid)

Returns whether this initialization data applies to the specified scheme.

void
writeToParcel(Parcel dest, int flags)

Inherited Constants

From android.os.Parcelable
static final int
static final int

Constants

CREATOR

public static final Parcelable.Creator<DrmInitData.SchemeDataCREATOR

Public fields

data

public final @Nullable byte[] data

The initialization data. May be null for scheme support checks only.

licenseServerUrl

public final @Nullable String licenseServerUrl

The URL of the server to which license requests should be made. May be null if unknown.

mimeType

public final String mimeType

The mimeType of data.

uuid

public final UUID uuid

The UUID of the DRM scheme, or UUID_NIL if the data is universal (i.e. applies to all schemes).

Public constructors

SchemeData

public SchemeData(UUID uuid, String mimeType, @Nullable byte[] data)
Parameters
UUID uuid

The UUID of the DRM scheme, or UUID_NIL if the data is universal (i.e. applies to all schemes).

String mimeType

See mimeType.

@Nullable byte[] data

See data.

SchemeData

public SchemeData(
    UUID uuid,
    @Nullable String licenseServerUrl,
    String mimeType,
    @Nullable byte[] data
)
Parameters
UUID uuid

The UUID of the DRM scheme, or UUID_NIL if the data is universal (i.e. applies to all schemes).

@Nullable String licenseServerUrl

See licenseServerUrl.

String mimeType

See mimeType.

@Nullable byte[] data

See data.

Public methods

canReplace

public boolean canReplace(DrmInitData.SchemeData other)

Returns whether this SchemeData can be used to replace other.

Parameters
DrmInitData.SchemeData other

A SchemeData.

Returns
boolean

Whether this SchemeData can be used to replace other.

copyWithData

public DrmInitData.SchemeData copyWithData(@Nullable byte[] data)

Returns a copy of this instance with the specified data.

Parameters
@Nullable byte[] data

The data to include in the copy.

Returns
DrmInitData.SchemeData

The new instance.

describeContents

public int describeContents()

equals

public boolean equals(@Nullable Object obj)

hasData

public boolean hasData()

Returns whether data is non-null.

hashCode

public int hashCode()

matches

public boolean matches(UUID schemeUuid)

Returns whether this initialization data applies to the specified scheme.

Parameters
UUID schemeUuid

The scheme UUID.

Returns
boolean

Whether this initialization data applies to the specified scheme.

writeToParcel

public void writeToParcel(Parcel dest, int flags)