Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/media/MediaExtractor.CasInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/MediaExtractor.CasInfo#inhmethods)

# MediaExtractor.CasInfo

*** ** * ** ***

` public static final class MediaExtractor.CasInfo `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.media.MediaExtractor.CasInfo |

<br />

*** ** * ** ***

Describes the conditional access system used to scramble a track.

## Summary

| ### Public methods ||
|---|---|
| ` byte[]` | ` https://developer.android.com/reference/android/media/MediaExtractor.CasInfo#getPrivateData()() ` Retrieves the private data in the CA_Descriptor associated with a track. |
| ` https://developer.android.com/reference/android/media/MediaCas.Session` | ` https://developer.android.com/reference/android/media/MediaExtractor.CasInfo#getSession()() ` Retrieves the `https://developer.android.com/reference/android/media/MediaCas.Session` associated with a track. |
| ` int` | ` https://developer.android.com/reference/android/media/MediaExtractor.CasInfo#getSystemId()() ` Retrieves the system id of the conditional access system. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public methods

### getPrivateData

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public byte[] getPrivateData ()
```

Retrieves the private data in the CA_Descriptor associated with a track. Some CAS systems may need this to initialize the CAS plugin object. This private data can only be retrieved before a valid `https://developer.android.com/reference/android/media/MediaCas` object is set on the extractor.

<br />

<br />

| Returns ||
|---|---|
| `byte[]` | a byte array containing the private data. A null return value indicates that the private data is unavailable. An empty array, on the other hand, indicates that the private data is empty (zero in length). <br /> |

**See also:**

- `https://developer.android.com/reference/android/media/MediaExtractor#setMediaCas(android.media.MediaCas)`

  `https://developer.android.com/reference/android/media/MediaExtractor#setMediaCas(android.media.MediaCas)`

### getSession

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MediaCas.Session getSession ()
```

Retrieves the `https://developer.android.com/reference/android/media/MediaCas.Session` associated with a track. The session is needed to initialize a descrambler in order to decode the scrambled track. The session object can only be retrieved after a valid `https://developer.android.com/reference/android/media/MediaCas` object is set on the extractor.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/media/MediaCas.Session` | a `https://developer.android.com/reference/android/media/MediaCas.Session` object associated with a track. <br /> |

**See also:**

- `https://developer.android.com/reference/android/media/MediaExtractor#setMediaCas(android.media.MediaCas)`
- `https://developer.android.com/reference/android/media/MediaDescrambler#setMediaCasSession(android.media.MediaCas.Session)`

  `https://developer.android.com/reference/android/media/MediaDescrambler#setMediaCasSession(android.media.MediaCas.Session)`

### getSystemId

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getSystemId ()
```

Retrieves the system id of the conditional access system.

<br />

| Returns ||
|---|---|
| `int` | CA system id of the CAS used to scramble the track. <br /> |