Fields Summary |
---|
public static final String | DRM_MIMETYPE_MESSAGE_STRINGThe "application/vnd.oma.drm.message" mime type. |
public static final String | DRM_MIMETYPE_CONTENT_STRINGThe "application/vnd.oma.drm.content" mime type. |
public static final int | DRM_FORWARD_LOCKThe DRM delivery type: Forward-Lock |
public static final int | DRM_COMBINED_DELIVERYThe DRM delivery type: Combined Delivery |
public static final int | DRM_SEPARATE_DELIVERYThe DRM delivery type: Separate Delivery |
public static final int | DRM_SEPARATE_DELIVERY_DMThe DRM delivery type: Separate Delivery in DRM message |
public static final int | DRM_UNKNOWN_DATA_LENThe DRM media content length is unknown currently |
private static final int | DRM_MIMETYPE_MESSAGEThe id of "application/vnd.oma.drm.message" mime type. |
private static final int | DRM_MIMETYPE_CONTENTThe id of "application/vnd.oma.drm.content" mime type. |
private static final int | JNI_DRM_SUCCESSSuccessful operation. |
private static final int | JNI_DRM_FAILUREGeneral failure. |
private static final int | JNI_DRM_EOFIndicates the end of the DRM content is reached. |
private static final int | JNI_DRM_UNKNOWN_DATA_LENThe media content length is unknown from native method |
private BufferedInputStream | inDataThe member to save the original InputStream data. |
private int | inDataLenThe member to save the original InputStream data length. |
private int | idThe unique id to this DRM content. It will be initialized
in constructor by native method. And it will not be changed
after initialization. |
private String | rightsIssuerThe rights issuer address of this DRM object. |
private String | mediaTypeThe media content type of this DRM object. |
private int | rawTypeThe delivery method type of this DRM object. |
Methods Summary |
---|
protected native void | finalize()The finalizer of the DRMRawContent. Do some cleanup.
|
public java.io.InputStream | getContentInputStream(DrmRights rights)Get one InputStream object to read decrypted content.
if (null == rights)
throw new NullPointerException();
return new DrmInputStream(rights);
|
public int | getContentLength(DrmRights rights)Get the length of the decrypted media content.
/**
* Because currently the media object associate with rights object
* has been handled in native logic, so here it is not need to deal
* the rights. But for the apps, it is mandatory for user to get
* the rights object before get the media content length.
*/
if (null == rights)
throw new NullPointerException();
int mediaLen = nativeGetContentLength();
if (JNI_DRM_FAILURE == mediaLen)
throw new DrmException("nativeGetContentLength() returned JNI_DRM_FAILURE");
if (JNI_DRM_UNKNOWN_DATA_LEN == mediaLen)
return DRM_UNKNOWN_DATA_LEN;
return mediaLen;
|
public java.lang.String | getContentType()Get the type of the decrypted media content.
return mediaType;
|
public int | getRawType()Get the type of the raw DRM content.
return rawType;
|
public java.lang.String | getRightsAddress()Get rights address from raw Seperate Delivery content.
return rightsIssuer;
|
private native int | nativeConstructDrmContent(java.io.InputStream data, int len, int mimeType)native method: construct a DRM content according the mime type.
|
private native int | nativeGetContentLength()native method: get this DRM decrypted media content length.
|
private native java.lang.String | nativeGetContentType()native method: get this DRM content type.
|
private native int | nativeGetDeliveryMethod()native method: get this DRM content delivery type.
|
private native java.lang.String | nativeGetRightsAddress()native method: get this DRM content rights issuer.
|
private native int | nativeReadContent(byte[] buf, int bufOff, int len, int mediaOff)native method: get a piece of media content data.
|