# PerStateBytes

Summary:[Inherited Constants](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#inhconstants)\|[Fields](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#lfields)\|[Ctors](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#pubctors)\|[Methods](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#inhmethods)  

# PerStateBytes

`
public

final

class
PerStateBytes
`  
`

extends Object


``


implements

Parcelable


`

|---|------------------------------------|
| java.lang.Object                      ||
| ↳ | android.car.watchdog.PerStateBytes |

<br />

*** ** * ** ***

Number of bytes attributed to each application or system state.

## Summary

|                                                                                                                                                                 ### Inherited constants                                                                                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface`android.os.Parcelable` |-------|----------------------------------------| | `int` | `CONTENTS_FILE_DESCRIPTOR` <br />      | | `int` | `PARCELABLE_ELIDE_DUPLICATES` <br />   | | `int` | `PARCELABLE_STABILITY_LOCAL` <br />    | | `int` | `PARCELABLE_STABILITY_VINTF` <br />    | | `int` | `PARCELABLE_WRITE_RETURN_VALUE` <br /> | |

|                                                                                                             ### Fields                                                                                                              ||
|-------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|
| ` public static final Creator<`[PerStateBytes](https://developer.android.com/reference/android/car/watchdog/PerStateBytes)`>` | [CREATOR](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#CREATOR) <br /> |

|                                                                                                             ### Public constructors                                                                                                             ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[PerStateBytes](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#PerStateBytes(long,%20long,%20long))`(long foregroundModeBytes, long backgroundModeBytes, long garageModeBytes) ` Creates a new PerStateBytes. |

|                                                                                               ### Public methods                                                                                                ||
|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int`    | ` `[describeContents](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#describeContents())`() `                                                                            |
| ` long`   | ` `[getBackgroundModeBytes](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#getBackgroundModeBytes())`() ` Number of bytes attributed to the application background mode. |
| ` long`   | ` `[getForegroundModeBytes](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#getForegroundModeBytes())`() ` Number of bytes attributed to the application foreground mode. |
| ` long`   | ` `[getGarageModeBytes](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#getGarageModeBytes())`() ` Number of bytes attributed to the system garage mode.                  |
| ` String` | ` `[toString](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#toString())`() `                                                                                            |
| ` void`   | ` `[writeToParcel](https://developer.android.com/reference/android/car/watchdog/PerStateBytes#writeToParcel(android.os.Parcel,%20int))`(Parcel dest, int flags) `                                    |

| ### Inherited methods |
|-----------------------|---|
| From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| From interface` android.os.Parcelable ` |------------------|------------------------------------------| | ` abstract int`  | ` describeContents() `                   | | ` default int`   | ` getStability() `                       | | ` abstract void` | ` writeToParcel(Parcel arg0, int arg1) ` | ||

## Fields

### CREATOR

```
public static final Creator<PerStateBytes> CREATOR
```

<br />

<br />

## Public constructors

### PerStateBytes

```
public PerStateBytes (long foregroundModeBytes, 
                long backgroundModeBytes, 
                long garageModeBytes)
```

Creates a new PerStateBytes.

<br />

|                                              Parameters                                              ||
|-----------------------|-------------------------------------------------------------------------------|
| `foregroundModeBytes` | `long`: Number of bytes attributed to the application foreground mode. <br /> |
| `backgroundModeBytes` | `long`: Number of bytes attributed to the application background mode. <br /> |
| `garageModeBytes`     | `long`: Number of bytes attributed to the system garage mode. <br />          |

## Public methods

### describeContents

```
public int describeContents ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getBackgroundModeBytes

```
public long getBackgroundModeBytes ()
```

Number of bytes attributed to the application background mode.

<br />

|    Returns     ||
|--------|--------|
| `long` | <br /> |

### getForegroundModeBytes

```
public long getForegroundModeBytes ()
```

Number of bytes attributed to the application foreground mode.

<br />

|    Returns     ||
|--------|--------|
| `long` | <br /> |

### getGarageModeBytes

```
public long getGarageModeBytes ()
```

Number of bytes attributed to the system garage mode.

<br />

|    Returns     ||
|--------|--------|
| `long` | <br /> |

### toString

```
public String toString ()
```

<br />

<br />

|     Returns      ||
|----------|--------|
| `String` | <br /> |

### writeToParcel

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

<br />

<br />

|        Parameters        ||
|---------|-----------------|
| `dest`  | `Parcel` <br /> |
| `flags` | `int` <br />    |