Class Blob.BlobSourceOption (2.9.0)

public static class Blob.BlobSourceOption extends Option

Class for specifying blob source options when Blob methods are used.

Inheritance

Object > Option > Blob.BlobSourceOption

Static Methods

decryptionKey(String key)

public static Blob.BlobSourceOption decryptionKey(String key)

Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob.

Parameter
NameDescription
keyString

the AES256 encoded in base64

Returns
TypeDescription
Blob.BlobSourceOption

decryptionKey(Key key)

public static Blob.BlobSourceOption decryptionKey(Key key)

Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob.

Parameter
NameDescription
keyKey
Returns
TypeDescription
Blob.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
TypeDescription
Blob.BlobSourceOption

generationNotMatch()

public static Blob.BlobSourceOption generationNotMatch()

Returns an option for blob's generation mismatch. If this option is used the request will fail if generation matches.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
shouldReturnRawInputStreamboolean
Returns
TypeDescription
Blob.BlobSourceOption

userProject(String userProject)

public static Blob.BlobSourceOption userProject(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
NameDescription
userProjectString
Returns
TypeDescription
Blob.BlobSourceOption