[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

DrmInfo  |  Android Developers

public class DrmInfo
extends Object



This class was deprecated in API level 30.
Please use MediaDrm

An entity class that describes the information required to send transactions between a device and an online DRM server. The DRM framework achieves server registration, license acquisition, and any other server-related transactions by passing an instance of this class to DrmManagerClient#processDrmInfo.

The caller can retrieve the DrmInfo instance by passing a DrmInfoRequest instance to DrmManagerClient#acquireDrmInfo.

Summary

Public constructors

DrmInfo(int infoType, byte[] data, String mimeType)

Creates a DrmInfo object with the given parameters.

DrmInfo(int infoType, String path, String mimeType)

Creates a DrmInfo object with the given parameters.

Public methods

Object get(String key)

Retrieves the value of a given key.

byte[] getData()

Retrieves the trigger data associated with this object.

int getInfoType()

Retrieves the information type associated with this object.

String getMimeType()

Retrieves the MIME type associated with this object.

Iterator<Object> iterator()

Retrieves an iterator object that you can use to iterate over the values associated with this DrmInfo object.

Iterator<String> keyIterator()

Retrieves an iterator object that you can use to iterate over the keys associated with this DrmInfo object.

void put(String key, Object value)

Adds optional information as key-value pairs to this object.

Inherited methods

From class java.lang.Object

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

DrmInfo

public DrmInfo (int infoType, 
                byte[] data, 
                String mimeType)

Creates a DrmInfo object with the given parameters.

Parameters
infoType int: The type of information.
data byte: The trigger data.
mimeType String: The MIME type.

DrmInfo

public DrmInfo (int infoType, 
                String path, 
                String mimeType)

Creates a DrmInfo object with the given parameters.

Parameters
infoType int: The type of information.
path String: The trigger data.
mimeType String: The MIME type.

Public methods

get

public Object get (String key)

Retrieves the value of a given key.

Parameters
key String: The key whose value is being retrieved.
Returns
Object The value of the key being retrieved. Returns null if the key cannot be found.

getData

public byte[] getData ()

Retrieves the trigger data associated with this object.

Returns
byte[] The trigger data.

getInfoType

public int getInfoType ()

Retrieves the information type associated with this object.

Returns
int The information type.

getMimeType

public String getMimeType ()

Retrieves the MIME type associated with this object.

Returns
String The MIME type.

iterator

public Iterator<Object> iterator ()

Retrieves an iterator object that you can use to iterate over the values associated with this DrmInfo object.

Returns
Iterator<Object> The iterator object.

keyIterator

public Iterator<String> keyIterator ()

Retrieves an iterator object that you can use to iterate over the keys associated with this DrmInfo object.

Returns
Iterator<String> The iterator object.

put

public void put (String key, 
                Object value)

Adds optional information as key-value pairs to this object. To add a custom object to the DrmInfo object, you must override the Object.toString() implementation.

Parameters
key String: Key to add.
value Object: Value to add.