close
The Wayback Machine - https://web.archive.org/web/20170922151902/https://developer.android.com/reference/android/media/MediaCas.Session.html
Skip to content

Most visited

Recently visited

navigation

MediaCas.Session

public final class MediaCas.Session
extends Object implements AutoCloseable

java.lang.Object
   ↳ android.media.MediaCas.Session


Class for an open session with the CA system.

Summary

Public methods

void close()

Close the session.

void processEcm(byte[] data)

Send a received ECM packet to the specified session of the CA system.

void processEcm(byte[] data, int offset, int length)

Send a received ECM packet to the specified session of the CA system.

void setPrivateData(byte[] data)

Set the private data for a session.

Inherited methods

BERJAYA From class java.lang.Object
BERJAYA From interface java.lang.AutoCloseable

Public methods

close

added in API level 26
void close ()

Close the session.

Throws
IllegalStateException if the MediaCas instance is not valid.
MediaCasStateException for CAS-specific state exceptions.

processEcm

added in API level 26
void processEcm (byte[] data)

Send a received ECM packet to the specified session of the CA system. This is similar to processEcm(byte[], int, int) except that the entire byte array is sent.

Parameters
data byte: byte array of the ECM data.

This value must never be null.

Throws
IllegalStateException if the MediaCas instance is not valid.
MediaCasException for CAS-specific errors.
MediaCasStateException for CAS-specific state exceptions.

processEcm

added in API level 26
void processEcm (byte[] data, 
                int offset, 
                int length)

Send a received ECM packet to the specified session of the CA system.

Parameters
data byte: byte array of the ECM data.

This value must never be null.

offset int: position within data where the ECM data begins.

length int: length of the data (starting from offset).

Throws
IllegalStateException if the MediaCas instance is not valid.
MediaCasException for CAS-specific errors.
MediaCasStateException for CAS-specific state exceptions.

setPrivateData

added in API level 26
void setPrivateData (byte[] data)

Set the private data for a session.

Parameters
data byte: byte array of the private data.

This value must never be null.

Throws
IllegalStateException if the MediaCas instance is not valid.
MediaCasException for CAS-specific errors.
MediaCasStateException for CAS-specific state exceptions.
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)