# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# DrmRights

`public class DrmRights`
`extends Object` ``

java.lang.Object
↳ | android.drm.DrmRights

This class is deprecated.
Please use `MediaDrm`

An entity class that wraps the license information retrieved from the online DRM server.

A caller can instantiate a `DrmRights` object by first invoking the `DrmManagerClient#processDrmInfo(DrmInfo)` method and then using the resulting `ProcessedData` object to invoke the `DrmRights#DrmRights(ProcessedData, String)` constructor.

A caller can also instantiate a `DrmRights` object by using the `DrmRights#DrmRights(String, String)` constructor, which takes a path to a file containing rights information instead of a `ProcessedData`.

Please note that the account id and subscription id is not mandatory by all DRM agents or plugins. When account id or subscription id is not required by the specific DRM agent or plugin, they can be either null, or an empty string, or any other don't-care string value.

## Summary

### Public constructors
`DrmRights(String rightsFilePath, String mimeType)` Creates a `DrmRights` object with the given parameters.
`DrmRights(String rightsFilePath, String mimeType, String accountId)` Creates a `DrmRights` object with the given parameters.
`DrmRights(String rightsFilePath, String mimeType, String accountId, String subscriptionId)` Creates a `DrmRights` object with the given parameters.
`DrmRights(File rightsFile, String mimeType)` Creates a `DrmRights` object with the given parameters.
`DrmRights(ProcessedData data, String mimeType)` Creates a `DrmRights` object with the given parameters.

### Public methods
`String` | `getAccountId()` Retrieves the account ID associated with this `DrmRights` object.
`byte[]` | `getData()` Retrieves the rights data associated with this `DrmRights` object.
`String` | `getMimeType()` Retrieves the MIME type associated with this `DrmRights` object.
`String` | `getSubscriptionId()` Retrieves the subscription ID associated with this `DrmRights` 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 timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### DrmRights

    public DrmRights (String rightsFilePath,
                    String mimeType)

Creates a `DrmRights` object with the given parameters.

Parameters
`rightsFilePath` | `String`: Path to the file containing rights information.
`mimeType` | `String`: MIME type. Must not be null or an empty string.

### DrmRights

    public DrmRights (String rightsFilePath,
                    String mimeType,
                    String accountId)

Creates a `DrmRights` object with the given parameters.

Parameters
`rightsFilePath` | `String`: Path to the file containing rights information.
`mimeType` | `String`: MIME type. Must not be null or an empty string.
`accountId` | `String`: Account ID of the user.

### DrmRights

    public DrmRights (String rightsFilePath,
                    String mimeType,
                    String accountId,
                    String subscriptionId)

Creates a `DrmRights` object with the given parameters.

Parameters
`rightsFilePath` | `String`: Path to the file containing rights information.
`mimeType` | `String`: MIME type. Must not be null or an empty string.
`accountId` | `String`: Account ID of the user.
`subscriptionId` | `String`: Subscription ID of the user.

### DrmRights

    public DrmRights (File rightsFile,
                    String mimeType)

Creates a `DrmRights` object with the given parameters.

Parameters
`rightsFile` | `File`: File containing rights information.
`mimeType` | `String`: MIME type. Must not be null or an empty string.

### DrmRights

    public DrmRights (ProcessedData data,
                    String mimeType)

Creates a `DrmRights` object with the given parameters.

Parameters
`data` | `ProcessedData`: A `ProcessedData` object containing rights information. Must not be null.
`mimeType` | `String`: The MIME type. It must not be null or an empty string.

## Public methods

### getAccountId

    public String getAccountId ()

Retrieves the account ID associated with this `DrmRights` object.

Returns
`String` | The account ID.

### getData

    public byte[] getData ()

Retrieves the rights data associated with this `DrmRights` object.

Returns
`byte[]` | A `byte` array representing the rights data.

### getMimeType

    public String getMimeType ()

Retrieves the MIME type associated with this `DrmRights` object.

Returns
`String` | The MIME type.

### getSubscriptionId

    public String getSubscriptionId ()

Retrieves the subscription ID associated with this `DrmRights` object.

Returns
`String` | The subscription ID.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*