public static class Blob.BlobSourceOption extends Option<UnifiedOpts.ObjectSourceOpt>
Class for specifying blob source options when Blob
methods are used.
Inheritance
java.lang.Object > com.google.cloud.storage.UnifiedOpts.OptionShim > Option > Blob.BlobSourceOptionStatic Methods
decryptionKey(@NonNull String key)
public static Blob.BlobSourceOption decryptionKey(@NonNull String key)
Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob.
Parameter | |
---|---|
Name | Description |
key | @org.checkerframework.checker.nullness.qual.NonNull java.lang.String the AES256 encoded in base64 |
Returns | |
---|---|
Type | Description |
Blob.BlobSourceOption |
decryptionKey(@NonNull Key key)
public static Blob.BlobSourceOption decryptionKey(@NonNull Key key)
Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob.
Parameter | |
---|---|
Name | Description |
key | @org.checkerframework.checker.nullness.qual.NonNull java.security.Key |
Returns | |
---|---|
Type | Description |
Blob.BlobSourceOption |
dedupe(Blob.BlobSourceOption[] os)
public static Blob.BlobSourceOption[] dedupe(Blob.BlobSourceOption[] os)
Deduplicate any options which are the same parameter. The value which comes last in
os
will be the value included in the return.
Parameter | |
---|---|
Name | Description |
os | BlobSourceOption[] |
Returns | |
---|---|
Type | Description |
BlobSourceOption[] |
dedupe(Blob.BlobSourceOption[] array, Blob.BlobSourceOption[] os)
public static Blob.BlobSourceOption[] dedupe(Blob.BlobSourceOption[] array, Blob.BlobSourceOption[] os)
Deduplicate any options which are the same parameter.
The value which comes last in collection
and os
will be the value included
in the return. All options from os
will override their counterparts in
collection
.
Parameters | |
---|---|
Name | Description |
array | BlobSourceOption[] |
os | BlobSourceOption[] |
Returns | |
---|---|
Type | Description |
BlobSourceOption[] |
dedupe(Collection<Blob.BlobSourceOption> collection, Blob.BlobSourceOption[] os)
public static Blob.BlobSourceOption[] dedupe(Collection<Blob.BlobSourceOption> collection, Blob.BlobSourceOption[] os)
Deduplicate any options which are the same parameter.
The value which comes last in collection
and os
will be the value included
in the return. All options from os
will override their counterparts in
collection
.
Parameters | |
---|---|
Name | Description |
collection | Collection<BlobSourceOption> |
os | BlobSourceOption[] |
Returns | |
---|---|
Type | Description |
BlobSourceOption[] |
generationMatch()
public static Blob.BlobSourceOption generationMatch()
Returns an option for blob's generation match. If this option is used the request will fail if generation does not match.
Returns | |
---|---|
Type | Description |
Blob.BlobSourceOption |
generationNotMatch() (deprecated)
public static Blob.BlobSourceOption generationNotMatch()
Deprecated. This option is invalid, and can never result in a valid response from the server.
Returns an option for blob's generation mismatch. If this option is used the request will fail if generation matches.
Returns | |
---|---|
Type | Description |
Blob.BlobSourceOption |
metagenerationMatch()
public static Blob.BlobSourceOption metagenerationMatch()
Returns an option for blob's metageneration match. If this option is used the request will fail if metageneration does not match.
Returns | |
---|---|
Type | Description |
Blob.BlobSourceOption |
metagenerationNotMatch()
public static Blob.BlobSourceOption metagenerationNotMatch()
Returns an option for blob's metageneration mismatch. If this option is used the request will fail if metageneration matches.
Returns | |
---|---|
Type | Description |
Blob.BlobSourceOption |
shouldReturnRawInputStream(boolean shouldReturnRawInputStream)
public static Blob.BlobSourceOption shouldReturnRawInputStream(boolean shouldReturnRawInputStream)
Returns an option for whether the request should return the raw input stream, instead of automatically decompressing the content. By default, this is false for Blob.downloadTo(), but true for ReadChannel.read().
Parameter | |
---|---|
Name | Description |
shouldReturnRawInputStream | boolean |
Returns | |
---|---|
Type | Description |
Blob.BlobSourceOption |
userProject(@NonNull String userProject)
public static Blob.BlobSourceOption userProject(@NonNull String userProject)
Returns an option for blob's billing user project. This option is used only if the blob's bucket has requester_pays flag enabled.
Parameter | |
---|---|
Name | Description |
userProject | @org.checkerframework.checker.nullness.qual.NonNull java.lang.String |
Returns | |
---|---|
Type | Description |
Blob.BlobSourceOption |