# Bundleable

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/serialization/Bundleable.java+class:androidx.car.app.serialization.Bundleable) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***


```
public final class Bundleable implements Parcelable
```

<br />

*** ** * ** ***

A class that serializes and stores an object for sending over IPC.

## Summary

| ### Constants |
|---|---|
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Parcelable.Creator.html<https://developer.android.com/reference/androidx/car/app/serialization/Bundleable>` | `https://developer.android.com/reference/androidx/car/app/serialization/Bundleable#CREATOR()` |

| ### Public methods |
|---|---|
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/serialization/Bundleable` | `https://developer.android.com/reference/androidx/car/app/serialization/Bundleable#create(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Object.html objectToSerialize)` Serializes the `objectToSerialize` into a `https://developer.android.com/reference/androidx/car/app/serialization/Bundleable` to send over IPC. |
| `int` | `https://developer.android.com/reference/androidx/car/app/serialization/Bundleable#describeContents()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Object.html` | `https://developer.android.com/reference/androidx/car/app/serialization/Bundleable#get()()` De-serializes the object passed in for IPC communication. |
| `void` | `https://developer.android.com/reference/androidx/car/app/serialization/Bundleable#writeToParcel(android.os.Parcel,int)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Parcel.html dest, int flags)` |

| ### Inherited Constants |
|---|
| From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) |---|---| | `static final int` | `https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR = 1` | | `static final int` | `https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE = 1` | |

## Constants

### CREATOR

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

```
public static final @NonNull Parcelable.Creator<Bundleable> CREATOR
```

## Public methods

### create

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

```
public static @NonNull Bundleable create(@NonNull Object objectToSerialize)
```

Serializes the `objectToSerialize` into a `https://developer.android.com/reference/androidx/car/app/serialization/Bundleable` to send over IPC.

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/serialization/BundlerException` | if serialization fails |

### describeContents

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

```
public int describeContents()
```

### get

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

```
public @NonNull Object get()
```

De-serializes the object passed in for IPC communication.

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/serialization/BundlerException` | if deserialization fails |

### writeToParcel

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

```
public void writeToParcel(@NonNull Parcel dest, int flags)
```