Package com.castlabs.sdk.base.subtitles.utilities

# Class DrmInitData.SchemeData

java.lang.Object
com.castlabs.sdk.base.subtitles.utilities.DrmInitData.SchemeData

All Implemented Interfaces:
  `Parcelable`

Enclosing class:
  `DrmInitData`

public static final class DrmInitData.SchemeData extends Object implements Parcelable
Scheme initialization data.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface android.os.Parcelable

  `Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Parcelable.Creator<DrmInitData.SchemeData>`
  `CREATOR`
  `final byte[]`
  `data`
  The initialization data.
  `final UUID[]`
  `keyIds`
  Default key ids for `Constants.COMMON_PSSH_UUID` or `null`
  `final String`
  `licenseServerUrl`
  The URL of the server to which license requests should be made.
  `final String`
  `mimeType`
  The mimeType of `data`.

  ### Fields inherited from interface android.os.Parcelable

  `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SchemeData(UUID uuid, String mimeType, byte[] data)`
  `SchemeData(UUID uuid, String licenseServerUrl, String mimeType, byte[] data)`
  `SchemeData(UUID uuid, String licenseServerUrl, String mimeType, byte[] data, UUID[] keyIds)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `canReplace(DrmInitData.SchemeData other)`
  Returns whether this `DrmInitData.SchemeData` can be used to replace `other`.
  `DrmInitData.SchemeData`
  `copyWithData(byte[] data)`
  Returns a copy of this instance with the specified data.
  `int`
  `describeContents()`
  `boolean`
  `equals(Object obj)`
  `boolean`
  `hasData()`
  Returns whether `data` is non-null.
  `int`
  `hashCode()`
  `boolean`
  `matches(UUID schemeUuid)`
  Returns whether this initialization data applies to the specified scheme.
  `boolean`
  `matchesUUID(DrmInitData.SchemeData other)`
  `void`
  `writeToParcel(Parcel dest, int flags)`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### licenseServerUrl

    @Nullable public final 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`.

  - ### data

    @Nullable public final byte[] data
    The initialization data. May be null for scheme support checks only.

  - ### keyIds

    @Nullable public final UUID[] keyIds
    Default key ids for `Constants.COMMON_PSSH_UUID` or `null`

  - ### CREATOR

    public static final Parcelable.Creator<DrmInitData.SchemeData> CREATOR

- ## Constructor Details

  - ### SchemeData

    public SchemeData(UUID uuid, String mimeType, @Nullable byte[] data)
    Parameters:
      `uuid` - The `UUID` of the DRM scheme, or `Constants.UUID_NIL` if the data is universal (i.e. applies to all schemes).
      `mimeType` - See `mimeType`.
      `data` - See `data`.

  - ### SchemeData

    public SchemeData(UUID uuid, @Nullable String licenseServerUrl, String mimeType, @Nullable byte[] data)
    Parameters:
      `uuid` - The `UUID` of the DRM scheme, or `Constants.UUID_NIL` if the data is universal (i.e. applies to all schemes).
      `licenseServerUrl` - See `licenseServerUrl`.
      `mimeType` - See `mimeType`.
      `data` - See `data`.

  - ### SchemeData

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

- ## Method Details

  - ### matchesUUID

    public boolean matchesUUID(DrmInitData.SchemeData other)

  - ### matches

    public boolean matches(UUID schemeUuid)
    Returns whether this initialization data applies to the specified scheme.
    Parameters:
      `schemeUuid` - The scheme `UUID`.
    Returns:
      Whether this initialization data applies to the specified scheme.

  - ### canReplace

    public boolean canReplace(DrmInitData.SchemeData other)
    Returns whether this `DrmInitData.SchemeData` can be used to replace `other`.
    Parameters:
      `other` - A `DrmInitData.SchemeData`.
    Returns:
      Whether this `DrmInitData.SchemeData` can be used to replace `other`.

  - ### hasData

    public boolean hasData()
    Returns whether `data` is non-null.

  - ### copyWithData

    public DrmInitData.SchemeData copyWithData(@Nullable byte[] data)
    Returns a copy of this instance with the specified data.
    Parameters:
      `data` - The data to include in the copy.
    Returns:
      The new instance.

  - ### equals

    public boolean equals(@Nullable Object obj)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### describeContents

    public int describeContents()
    Specified by:
      `describeContents` in interface `Parcelable`

  - ### writeToParcel

    public void writeToParcel(Parcel dest, int flags)
    Specified by:
      `writeToParcel` in interface `Parcelable`