Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

DrmInfo

extends Object
java.lang.Object
   ↳ android.drm.DrmInfo

Class Overview

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 processDrmInfo(DrmInfo) .

The caller can retrieve the DrmInfo instance by passing a DrmInfoRequest instance to acquireDrmInfo(DrmInfoRequest) .

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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

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

Creates a DrmInfo object with the given parameters.

Parameters
infoType The type of information.
data The trigger data.
mimeType The MIME type.

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

Creates a DrmInfo object with the given parameters.

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

Public Methods

public Object get ( String key)

Retrieves the value of a given key.

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

public byte[] getData ()

Retrieves the trigger data associated with this object.

Returns
  • The trigger data.

public int getInfoType ()

Retrieves the information type associated with this object.

Returns
  • The information type.

public String getMimeType ()

Retrieves the MIME type associated with this object.

Returns
  • The MIME type.

public Iterator < Object > iterator ()

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

Returns
  • The iterator object.

public Iterator < String > keyIterator ()

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

Returns
  • The iterator object.

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 toString() implementation.

Parameters
key Key to add.
value Value to add.