StoreBytesData
Stay organized with collections
Save and categorize content based on your preferences.
Data passed by apps to Block Store.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_STABILITY_LOCAL |
|
int |
PARCELABLE_STABILITY_VINTF |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Public Method Summary
byte[] |
getBytes()
Raw bytes passed from apps to Block Store.
|
String
|
getKey()
The key with which the bytes are associated.
|
boolean |
shouldBackupToCloud()
Whether the bytes to be stored should be backed up to the cloud in the next
sync.
|
void |
|
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
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()
|
abstract void |
writeToParcel( Parcel arg0,
int arg1)
|
Public Methods
public byte[] getBytes ()
Raw bytes passed from apps to Block Store.
public String getKey ()
The key with which the bytes are associated.
If the key was never explicitly set when building the StoreBytesData
,
then the default key
BlockstoreClient.DEFAULT_BYTES_DATA_KEY
is associated with the
bytes
and therefore will be returned.
public boolean shouldBackupToCloud ()
Whether the bytes to be stored should be backed up to the cloud in the next
sync.
public void writeToParcel (Parcel dest, int
flags)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eStoreBytesData\u003c/code\u003e allows apps to pass data to Block Store, implementing \u003ccode\u003eParcelable\u003c/code\u003e for data transfer.\u003c/p\u003e\n"],["\u003cp\u003eIt includes methods to get the raw bytes, associated key, and cloud backup preference.\u003c/p\u003e\n"],["\u003cp\u003eA builder class, \u003ccode\u003eStoreBytesData.Builder\u003c/code\u003e, is available for creating \u003ccode\u003eStoreBytesData\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCREATOR\u003c/code\u003e field facilitates object creation from parcels.\u003c/p\u003e\n"],["\u003cp\u003eIf no key is explicitly set, the default key \u003ccode\u003eBlockstoreClient.DEFAULT_BYTES_DATA_KEY\u003c/code\u003e is used.\u003c/p\u003e\n"]]],["`StoreBytesData` manages data passed to Block Store, implementing `Parcelable` for data transfer. Key actions involve retrieving raw bytes via `getBytes()`, accessing associated keys with `getKey()`, and determining cloud backup status through `shouldBackupToCloud()`. Data can be written to a `Parcel` using `writeToParcel()`. It also has a `CREATOR` and provides a nested builder class called `StoreBytesData.Builder` to aid in constructing instances of the class.\n"],null,["# StoreBytesData\n\npublic class **StoreBytesData** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) \nData passed by apps to Block Store. \n\n### Nested Class Summary\n\n|-------|---|---|-------------------------------------------------------------------------------------------------------------------|\n| class | [StoreBytesData.Builder](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder) || A builder for [StoreBytesData](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData) objects. |\n\n### Inherited Constant Summary\n\nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_STABILITY_LOCAL | |\n| int | PARCELABLE_STABILITY_VINTF | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\n### Field Summary\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|---|\n| public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[StoreBytesData](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData)\\\u003e | [CREATOR](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData#CREATOR) | |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| byte\\[\\] | [getBytes](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData#getBytes())() Raw bytes passed from apps to Block Store. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getKey](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData#getKey())() The key with which the bytes are associated. |\n| boolean | [shouldBackupToCloud](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData#shouldBackupToCloud())() Whether the bytes to be stored should be backed up to the cloud in the next sync. |\n| void | [writeToParcel](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData#writeToParcel(android.os.Parcel,%20int))([Parcel](//developer.android.com/reference/android/os/Parcel.html) dest, int flags) |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface android.os.Parcelable \n\n|---------------|--------------------------------------------------------------------------------------------------|\n| abstract int | describeContents() |\n| abstract void | writeToParcel([Parcel](//developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |\n\nFields\n------\n\n#### public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[StoreBytesData](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData)\\\u003e\n**CREATOR**\n\nPublic Methods\n--------------\n\n#### public byte\\[\\] **getBytes** ()\n\nRaw bytes passed from apps to Block Store. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getKey** ()\n\nThe key with which the bytes are associated.\n\nIf the key was never explicitly set when building the `StoreBytesData`,\nthen the default key [BlockstoreClient.DEFAULT_BYTES_DATA_KEY](/android/reference/com/google/android/gms/auth/blockstore/BlockstoreClient#DEFAULT_BYTES_DATA_KEY) is associated with the\n`bytes` and therefore will be returned. \n\n#### public boolean **shouldBackupToCloud** ()\n\nWhether the bytes to be stored should be backed up to the cloud in the next\nsync. \n\n#### public void **writeToParcel** ([Parcel](//developer.android.com/reference/android/os/Parcel.html) dest, int flags)"]]