StoreBytesData.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Public Constructor Summary
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()
|
Public Methods
Sets the raw bytes to be stored with Block Store. See
BlockstoreClient.MAX_SIZE
for the maximum size allowed for a key-bytes
entry.
public StoreBytesData.Builder
setShouldBackupToCloud (boolean shouldBackupToCloud)
Sets whether the bytes to be stored should be backed up to the cloud in the next
sync.
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.Builder\u003c/code\u003e facilitates the creation of \u003ccode\u003eStoreBytesData\u003c/code\u003e objects for storing data with Block Store.\u003c/p\u003e\n"],["\u003cp\u003eIt allows you to specify the data (\u003ccode\u003ebytes\u003c/code\u003e), an associated key, and whether the data should be backed up to the cloud.\u003c/p\u003e\n"],["\u003cp\u003eIf a key is not explicitly set using \u003ccode\u003esetKey\u003c/code\u003e, the data is stored under a default key (\u003ccode\u003eBlockstoreClient.DEFAULT_BYTES_DATA_KEY\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild()\u003c/code\u003e method finalizes the builder configuration and returns the constructed \u003ccode\u003eStoreBytesData\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,["# StoreBytesData.Builder\n\npublic static final class **StoreBytesData.Builder** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nA builder for [StoreBytesData](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData)\nobjects. \n\n### Public Constructor Summary\n\n|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder#Builder())() Constructor for the [StoreBytesData.Builder](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder) class. |\n\n### Public Method Summary\n\n|------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [StoreBytesData](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData) | [build](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder#build())() Builds and returns the [StoreBytesData](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData) object. |\n| [StoreBytesData.Builder](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder) | [setBytes](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder#setBytes(byte[]))(byte\\[\\] bytes) Sets the raw bytes to be stored with Block Store. |\n| [StoreBytesData.Builder](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder) | [setKey](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder#setKey(java.lang.String))([String](//developer.android.com/reference/java/lang/String.html) key) Sets the key with which the `bytes` are associated with. |\n| [StoreBytesData.Builder](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder) | [setShouldBackupToCloud](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder#setShouldBackupToCloud(boolean))(boolean shouldBackupToCloud) Sets whether the bytes to be stored should be backed up to the cloud in the next sync. |\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\nPublic Constructors\n-------------------\n\n#### public **Builder** ()\n\nConstructor for the [StoreBytesData.Builder](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder) class.\n\nPublic Methods\n--------------\n\n#### public [StoreBytesData](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData)\n**build** ()\n\nBuilds and returns the [StoreBytesData](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData)\nobject. \n\n#### public [StoreBytesData.Builder](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder)\n**setBytes** (byte\\[\\] bytes)\n\nSets the raw bytes to be stored with Block Store. See [BlockstoreClient.MAX_SIZE](/android/reference/com/google/android/gms/auth/blockstore/BlockstoreClient#MAX_SIZE) for the maximum size allowed for a key-bytes\nentry. \n\n#### public [StoreBytesData.Builder](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder)\n**setKey** ([String](//developer.android.com/reference/java/lang/String.html) key)\n\nSets the key with which the `bytes` are associated with. See\n[BlockstoreClient.MAX_SIZE](/android/reference/com/google/android/gms/auth/blockstore/BlockstoreClient#MAX_SIZE) for the maximum size allowed for a key-bytes\nentry.\n\nIf `setKey` is never invoked, the bytes will be associated with the\ndefault key [BlockstoreClient.DEFAULT_BYTES_DATA_KEY](/android/reference/com/google/android/gms/auth/blockstore/BlockstoreClient#DEFAULT_BYTES_DATA_KEY) when stored into Block Store. \n\n#### public [StoreBytesData.Builder](/android/reference/com/google/android/gms/auth/blockstore/StoreBytesData.Builder)\n**setShouldBackupToCloud** (boolean shouldBackupToCloud)\n\nSets whether the bytes to be stored should be backed up to the cloud in the next\nsync."]]