Most visited

Recently visited

Added in API level 11

DrmRights

public class DrmRights
extends Object

java.lang.Object
    android.drm.DrmRights


包装从在线DRM服务器检索的许可证信息的实体类。

调用者可以首先调用 processDrmInfo(DrmInfo)方法,然后使用生成的 ProcessedData对象来调用 DrmRights(ProcessedData, String)构造函数,从而实例化一个 DrmRights对象。

调用者还可以使用 DrmRights(String, String)构造函数实例化 DrmRights对象,该构造函数将包含权限信息的文件路径替换为 ProcessedData

请注意,所有DRM代理或插件都不强制使用帐户ID和订阅ID。 当特定DRM代理或插件不需要帐户ID或订阅ID时,它们可以是空值,也可以是空字符串或任何其他不关注字符串值。

摘要(Summary)

Public constructors

DrmRights(String rightsFilePath, String mimeType)

用给定的参数创建一个 DrmRights对象。

DrmRights(String rightsFilePath, String mimeType, String accountId)

用给定的参数创建一个 DrmRights对象。

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

用给定的参数创建一个 DrmRights对象。

DrmRights(File rightsFile, String mimeType)

用给定的参数创建一个 DrmRights对象。

DrmRights(ProcessedData data, String mimeType)

用给定的参数创建一个 DrmRights对象。

公共方法(Public methods)

String getAccountId()

检索与此 DrmRights对象关联的帐户ID。

byte[] getData()

检索与此 DrmRights对象关联的权限数据。

String getMimeType()

检索与此 DrmRights对象关联的MIME类型。

String getSubscriptionId()

检索与此 DrmRights对象关联的订阅ID。

继承方法(Inherited methods)

From class java.lang.Object

Public constructors

DrmRights

Added in API level 11
DrmRights (String rightsFilePath, 
                String mimeType)

用给定的参数创建一个 DrmRights对象。

参数(Parameters)
rightsFilePath String: Path to the file containing rights information.
mimeType String: MIME type. Must not be null or an empty string.

DrmRights

Added in API level 11
DrmRights (String rightsFilePath, 
                String mimeType, 
                String accountId)

用给定的参数创建一个 DrmRights对象。

参数(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

Added in API level 11
DrmRights (String rightsFilePath, 
                String mimeType, 
                String accountId, 
                String subscriptionId)

用给定的参数创建一个 DrmRights对象。

参数(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

Added in API level 11
DrmRights (File rightsFile, 
                String mimeType)

用给定的参数创建一个 DrmRights对象。

参数(Parameters)
rightsFile File: File containing rights information.
mimeType String: MIME type. Must not be null or an empty string.

DrmRights

Added in API level 11
DrmRights (ProcessedData data, 
                String mimeType)

用给定的参数创建一个 DrmRights对象。

参数(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

Added in API level 11
String getAccountId ()

检索与此 DrmRights对象关联的帐户ID。

返回(Returns)
String The account ID.

getData

Added in API level 11
byte[] getData ()

检索与此 DrmRights对象关联的权限数据。

返回(Returns)
byte[] A byte array representing the rights data.

getMimeType

Added in API level 11
String getMimeType ()

检索与此 DrmRights对象关联的MIME类型。

返回(Returns)
String The MIME type.

getSubscriptionId

Added in API level 11
String getSubscriptionId ()

检索与此 DrmRights对象关联的订阅ID。

返回(Returns)
String The subscription ID.

Hooray!