# FakeStreamConfigurationMap

Artifact: [androidx.camera:camera-common-testing](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/common/testing/FakeStreamConfigurationMap.kt+class:androidx.camera.common.testing.FakeStreamConfigurationMap) Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

*** ** * ** ***


```
public final class FakeStreamConfigurationMap implements StreamConfigurationMapWrapper
```

<br />

*** ** * ** ***

A fake implementation of `https://developer.android.com/reference/androidx/camera/common/StreamConfigurationMapWrapper` for testing.

This class enables a developer to specify a table of input and output formats, along with the properties associated with them.

### Example

```
val fakeMap = FakeStreamConfigurationMap(
    outputsTable = linkedMapOf(
        OutputKey(ImageFormat.YUV_420_888, Size(1920, 1080)) to OutputValues(),
        OutputKey(ImageFormat.JPEG, Size(1920, 1080)) to OutputValues(
            stallDuration = 200000000L // 200ms stall duration for JPEG
        )
    )
)
```

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.InputTableEntry` Defines a single entry for a valid input format for testing purposes. |
| `public final class https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.OutputKey` Key used to identify an output configuration in `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap`. |
| `public final class https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.OutputValues` Values associated with an output configuration in `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#FakeStreamConfigurationMap(java.util.LinkedHashMap,kotlin.collections.List,kotlin.collections.Map,kotlin.collections.Set)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/LinkedHashMap.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.OutputKey, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.OutputValues> outputsTable, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.InputTableEntry> inputTable, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html>> outputFormatsForInputFormats, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>> outputClassTypes )` |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html>` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getHighResolutionOutputSizes(kotlin.Int)(int format)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Range.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html>>` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getHighSpeedVideoFpsRanges()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Range.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html>>` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getHighSpeedVideoFpsRangesFor(android.util.Size)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html size)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html>` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getHighSpeedVideoSizes()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html>` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getHighSpeedVideoSizesFor(android.util.Range)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Range.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> fpsRange)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html>` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getInputFormats()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html>` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getInputSizes(kotlin.Int)(int format)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html>` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputFormats()()` |
| `long` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputMinFrameDuration(kotlin.Int,android.util.Size)(int format, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html size)` |
| `long` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputMinFrameDuration(java.lang.Class,android.util.Size)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> klass, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html size )` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html>` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputSizes(kotlin.Int)(int format)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html>` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputSizes(java.lang.Class)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> klass)` |
| `long` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputStallDuration(kotlin.Int,android.util.Size)(int format, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html size)` |
| `long` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputStallDuration(java.lang.Class,android.util.Size)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> klass, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html size )` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html>` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getValidOutputFormatsForInput(kotlin.Int)(int inputFormat)` |
| `boolean` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#isOutputSupportedFor(kotlin.Int)(int format)` |
| `boolean` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#isOutputSupportedFor(java.lang.Class)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> klass)` Converting this method to non-static for testability. |
| `boolean` | `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#isOutputSupportedFor(android.view.Surface)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/Surface.html surface)` |
| `T` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#unwrapAs(java.lang.Class)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> type)` Attempts to unwrap this object into the specified underlying `https://developer.android.com/reference/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)`. |

## Public constructors

### FakeStreamConfigurationMap

```
public FakeStreamConfigurationMap(
    @NonNull LinkedHashMap<@NonNull FakeStreamConfigurationMap.OutputKey, @NonNull FakeStreamConfigurationMap.OutputValues> outputsTable,
    @NonNull List<@NonNull FakeStreamConfigurationMap.InputTableEntry> inputTable,
    @NonNull Map<@NonNull Integer, @NonNull List<@NonNull Integer>> outputFormatsForInputFormats,
    @NonNull Set<@NonNull Class<@NonNull ?>> outputClassTypes
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/LinkedHashMap.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.OutputKey, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.OutputValues> outputsTable` | The map of supported outputs, mapping `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.OutputKey` to `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.OutputValues`. Must be a `https://developer.android.com/reference/java/util/LinkedHashMap.html` to preserve insertion order. Used by output-related queries (e.g., `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputFormats()`, `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputSizes(java.lang.Class)`, `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputMinFrameDuration(kotlin.Int,android.util.Size)`). |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap.InputTableEntry> inputTable` | The list of supported inputs. Used by `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getInputFormats()` and `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getInputSizes(kotlin.Int)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html>> outputFormatsForInputFormats` | Mapping of input formats to their valid output formats. Used by `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getValidOutputFormatsForInput(kotlin.Int)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>> outputClassTypes` | Set of class types that are supported as outputs. Used by `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#isOutputSupportedFor(kotlin.Int)` (class-based queries) and `https://developer.android.com/reference/androidx/camera/common/testing/FakeStreamConfigurationMap#getOutputMinFrameDuration(kotlin.Int,android.util.Size)` (class-based queries). Class-based queries internally map to `https://developer.android.com/reference/android/graphics/ImageFormat.html#PRIVATE`. |

## Public methods

### getHighResolutionOutputSizes

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Size> getHighResolutionOutputSizes(int format)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getHighResolutionOutputSizes(int)` |   |

### getHighSpeedVideoFpsRanges

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Range<@NonNull Integer>> getHighSpeedVideoFpsRanges()
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getHighSpeedVideoFpsRanges()` |   |

### getHighSpeedVideoFpsRangesFor

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Range<@NonNull Integer>> getHighSpeedVideoFpsRangesFor(@NonNull Size size)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getHighSpeedVideoFpsRangesFor(android.util.Size)` |   |

### getHighSpeedVideoSizes

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Size> getHighSpeedVideoSizes()
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getHighSpeedVideoSizes()` |   |

### getHighSpeedVideoSizesFor

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Size> getHighSpeedVideoSizesFor(@NonNull Range<@NonNull Integer> fpsRange)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getHighSpeedVideoSizesFor(android.util.Range&lt;java.lang.Integer&gt;)` |   |

### getInputFormats

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Integer> getInputFormats()
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getInputFormats()` |   |

### getInputSizes

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Size> getInputSizes(int format)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getInputSizes(int)` |   |

### getOutputFormats

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Integer> getOutputFormats()
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputFormats()` |   |

### getOutputMinFrameDuration

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public long getOutputMinFrameDuration(int format, @NonNull Size size)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputMinFrameDuration(int, android.util.Size)` |   |

### getOutputMinFrameDuration

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public long <T extends Object> getOutputMinFrameDuration(
    @NonNull Class<@NonNull T> klass,
    @NonNull Size size
)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputMinFrameDuration(int, android.util.Size)` |   |

### getOutputSizes

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Size> getOutputSizes(int format)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputSizes(int)` |   |

### getOutputSizes

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Size> <T extends Object> getOutputSizes(@NonNull Class<@NonNull T> klass)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputSizes(int)` |   |

### getOutputStallDuration

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public long getOutputStallDuration(int format, @NonNull Size size)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputStallDuration(int, android.util.Size)` |   |

### getOutputStallDuration

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public long <T extends Object> getOutputStallDuration(
    @NonNull Class<@NonNull T> klass,
    @NonNull Size size
)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputStallDuration(int, android.util.Size)` |   |

### getValidOutputFormatsForInput

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public @NonNull List<@NonNull Integer> getValidOutputFormatsForInput(int inputFormat)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getValidOutputFormatsForInput(int)` |   |

### isOutputSupportedFor

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public boolean isOutputSupportedFor(int format)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#isOutputSupportedFor(android.view.Surface)` |   |

### isOutputSupportedFor

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public boolean <T extends Object> isOutputSupportedFor(@NonNull Class<@NonNull T> klass)
```

Converting this method to non-static for testability.

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#isOutputSupportedFor(android.view.Surface)` |   |

### isOutputSupportedFor

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public boolean isOutputSupportedFor(@NonNull Surface surface)
```

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#isOutputSupportedFor(android.view.Surface)` |   |

### unwrapAs

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
public T <T extends Object> unwrapAs(@NonNull Class<@NonNull T> type)
```

Attempts to unwrap this object into the specified underlying `https://developer.android.com/reference/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)`.

Callers should use this method to retrieve the wrapped platform object.

### Implementation Notes

- If the requested `https://developer.android.com/reference/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)` is not supported by this wrapper, this method must return `null`.

- Implementations designed for testing (e.g., fakes, mocks, or no-op wrappers) should return `null` to signal that no real underlying object is available.

| Parameters |
|---|---|
| `<T extends https://developer.android.com/reference/java/lang/Object.html>` | The expected type of the underlying object. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> type` | The `https://developer.android.com/reference/java/lang/Class.html` representing the expected type of the underlying object. |

| Returns |
|---|---|
| `T` | The underlying object cast to `https://developer.android.com/reference/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)`, or `null` if the object cannot be unwrapped into the requested `https://developer.android.com/reference/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)`. |