public class

DrmWrapper

extends Object
java.lang.Object
   ↳ com.android.mms.drm.DrmWrapper

Class Overview

The Drm Wrapper.

Summary

Public Constructors
DrmWrapper(String drmContentType, Uri uri, byte[] drmData)
Constructor.
Public Methods
boolean consumeRights()
Consume the rights.
String getContentType()
Get the decrypted object's content-type.
byte[] getDecryptedData()
Get decrypted data.
byte[] getOriginalData()
Uri getOriginalUri()
String getRightsAddress()
Get URL of right.
void installRights(byte[] rightData)
Install Right.
boolean isAllowedToForward()
Check whether this DRM object can be forwarded.
boolean isRightsInstalled()
Check whether the DRM object's right is existed.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DrmWrapper (String drmContentType, Uri uri, byte[] drmData)

Constructor.

Throws
DrmException
IOException

Public Methods

public boolean consumeRights ()

Consume the rights.

Returns
  • true if consume success false if consume failure

public String getContentType ()

Get the decrypted object's content-type.

Returns
  • the content-type

public byte[] getDecryptedData ()

Get decrypted data.

Returns
  • the decrypted content if decryption was successful.
Throws
IOException

public byte[] getOriginalData ()

public Uri getOriginalUri ()

public String getRightsAddress ()

Get URL of right.

Returns
  • the right's URL

public void installRights (byte[] rightData)

Install Right.

Parameters
rightData right's data
Throws
IOException
DrmException
IOException

public boolean isAllowedToForward ()

Check whether this DRM object can be forwarded.

Returns
  • true if this object can be forwarded false if not

public boolean isRightsInstalled ()

Check whether the DRM object's right is existed. If not, we should download it.

Returns
  • true if it is existed false if not