Build 1.0_r1(from source)

android.drm.mobile1
Class DrmRawContent

java.lang.Object
  extended by android.drm.mobile1.DrmRawContent

public class DrmRawContent
extends Object

This class provides interfaces to access the DRM raw content.


Nested Class Summary
(package private)  class DrmRawContent.DrmInputStream
          This class provide a InputStream to the DRM media content.
 
Field Summary
static int DRM_COMBINED_DELIVERY
          The DRM delivery type: Combined Delivery
static int DRM_FORWARD_LOCK
          The DRM delivery type: Forward-Lock
static String DRM_MIMETYPE_CONTENT_STRING
          The "application/vnd.oma.drm.content" mime type.
static String DRM_MIMETYPE_MESSAGE_STRING
          The "application/vnd.oma.drm.message" mime type.
static int DRM_SEPARATE_DELIVERY
          The DRM delivery type: Separate Delivery
static int DRM_SEPARATE_DELIVERY_DM
          The DRM delivery type: Separate Delivery in DRM message
static int DRM_UNKNOWN_DATA_LEN
          The DRM media content length is unknown currently
 
Constructor Summary
DrmRawContent(InputStream inRawdata, int len, String mimeTypeStr)
          Construct a DrmRawContent object.
 
Method Summary
protected  void finalize()
          The finalizer of the DRMRawContent.
 InputStream getContentInputStream(DrmRights rights)
          Get one InputStream object to read decrypted content.
 int getContentLength(DrmRights rights)
          Get the length of the decrypted media content.
 String getContentType()
          Get the type of the decrypted media content.
 int getRawType()
          Get the type of the raw DRM content.
 String getRightsAddress()
          Get rights address from raw Seperate Delivery content.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DRM_MIMETYPE_MESSAGE_STRING

public static final String DRM_MIMETYPE_MESSAGE_STRING
The "application/vnd.oma.drm.message" mime type.

See Also:
Constant Field Values

DRM_MIMETYPE_CONTENT_STRING

public static final String DRM_MIMETYPE_CONTENT_STRING
The "application/vnd.oma.drm.content" mime type.

See Also:
Constant Field Values

DRM_FORWARD_LOCK

public static final int DRM_FORWARD_LOCK
The DRM delivery type: Forward-Lock

See Also:
Constant Field Values

DRM_COMBINED_DELIVERY

public static final int DRM_COMBINED_DELIVERY
The DRM delivery type: Combined Delivery

See Also:
Constant Field Values

DRM_SEPARATE_DELIVERY

public static final int DRM_SEPARATE_DELIVERY
The DRM delivery type: Separate Delivery

See Also:
Constant Field Values

DRM_SEPARATE_DELIVERY_DM

public static final int DRM_SEPARATE_DELIVERY_DM
The DRM delivery type: Separate Delivery in DRM message

See Also:
Constant Field Values

DRM_UNKNOWN_DATA_LEN

public static final int DRM_UNKNOWN_DATA_LEN
The DRM media content length is unknown currently

See Also:
Constant Field Values
Constructor Detail

DrmRawContent

public DrmRawContent(InputStream inRawdata,
                     int len,
                     String mimeTypeStr)
              throws DrmException,
                     IOException
Construct a DrmRawContent object.

Parameters:
inRawdata - object of DRM raw data stream.
len - the length of raw data can be read.
mimeTypeStr - the mime type of the DRM content.
Throws:
DrmException
IOException
Method Detail

getRightsAddress

public String getRightsAddress()
Get rights address from raw Seperate Delivery content.

Returns:
the string of the rights issuer address, or null if no rights issuer.

getRawType

public int getRawType()
Get the type of the raw DRM content.

Returns:
one of the following delivery type of this DRM content: #DRM_FORWARD_LOCK #DRM_COMBINED_DELIVERY #DRM_SEPARATE_DELIVERY #DRM_SEPARATE_DELIVERY_DM

getContentInputStream

public InputStream getContentInputStream(DrmRights rights)
Get one InputStream object to read decrypted content.

Parameters:
rights - the rights object contain decrypted key.
Returns:
the InputStream object of decrypted media content.

getContentType

public String getContentType()
Get the type of the decrypted media content.

Returns:
the decrypted media content type of this DRM content.

getContentLength

public int getContentLength(DrmRights rights)
                     throws DrmException
Get the length of the decrypted media content.

Parameters:
rights - the rights object contain decrypted key.
Returns:
the length of the decrypted media content. #DRM_UNKNOWN_DATA_LEN if the length is unknown currently.
Throws:
DrmException

finalize

protected void finalize()
The finalizer of the DRMRawContent. Do some cleanup.

Overrides:
finalize in class Object

Build 1.0_r1(from source)

Please submit a feedback, bug or feature