public static class Blob.Builder extends BlobInfo.Builder
Blob
.Modifier and Type | Method and Description |
---|---|
Blob |
build()
Creates a
BlobInfo object. |
Blob.Builder |
setAcl(List<Acl> acl)
Sets the blob's access control configuration.
|
Blob.Builder |
setBlobId(BlobId blobId)
Sets the blob identity.
|
Blob.Builder |
setCacheControl(String cacheControl)
Sets the blob's data cache control.
|
Blob.Builder |
setContentDisposition(String contentDisposition)
Sets the blob's data content disposition.
|
Blob.Builder |
setContentEncoding(String contentEncoding)
Sets the blob's data content encoding.
|
Blob.Builder |
setContentLanguage(String contentLanguage)
Sets the blob's data content language.
|
Blob.Builder |
setContentType(String contentType)
Sets the blob's data content type.
|
Blob.Builder |
setCrc32c(String crc32c)
Sets the CRC32C checksum of blob's data as described in RFC 4960, Appendix B; encoded in
base64 in big-endian order.
|
Blob.Builder |
setCrc32cFromHexString(String crc32cHexString)
Sets the CRC32C checksum of blob's data as described in RFC 4960, Appendix B; from hex
string.
|
Blob.Builder |
setCustomTime(Long customTime)
Deprecated.
|
BlobInfo.Builder |
setCustomTimeOffsetDateTime(OffsetDateTime customTime)
Sets the custom time for an object.
|
Blob.Builder |
setEventBasedHold(Boolean eventBasedHold)
Sets the blob's event-based hold.
|
Blob.Builder |
setMd5(String md5)
Sets the MD5 hash of blob's data.
|
Blob.Builder |
setMd5FromHexString(String md5HexString)
Sets the MD5 hash of blob's data from hex string.
|
Blob.Builder |
setMetadata(Map<String,String> metadata)
Sets the blob's user provided metadata.
|
Blob.Builder |
setStorageClass(StorageClass storageClass)
Sets the blob's storage class.
|
Blob.Builder |
setTemporaryHold(Boolean temporaryHold)
Sets the blob's temporary hold.
|
Blob.Builder |
setTimeStorageClassUpdated(Long timeStorageClassUpdated)
Deprecated.
|
BlobInfo.Builder |
setTimeStorageClassUpdatedOffsetDateTime(OffsetDateTime timeStorageClassUpdated) |
public Blob.Builder setBlobId(BlobId blobId)
BlobInfo.Builder
setBlobId
in class BlobInfo.Builder
public Blob.Builder setContentType(String contentType)
BlobInfo.Builder
setContentType
in class BlobInfo.Builder
public Blob.Builder setContentDisposition(String contentDisposition)
BlobInfo.Builder
setContentDisposition
in class BlobInfo.Builder
public Blob.Builder setContentLanguage(String contentLanguage)
BlobInfo.Builder
setContentLanguage
in class BlobInfo.Builder
public Blob.Builder setContentEncoding(String contentEncoding)
BlobInfo.Builder
setContentEncoding
in class BlobInfo.Builder
public Blob.Builder setCacheControl(String cacheControl)
BlobInfo.Builder
setCacheControl
in class BlobInfo.Builder
public Blob.Builder setAcl(List<Acl> acl)
BlobInfo.Builder
setAcl
in class BlobInfo.Builder
public Blob.Builder setMd5(String md5)
BlobInfo.Builder
setMd5
in class BlobInfo.Builder
public Blob.Builder setMd5FromHexString(String md5HexString)
BlobInfo.Builder
setMd5FromHexString
in class BlobInfo.Builder
public Blob.Builder setCrc32c(String crc32c)
BlobInfo.Builder
setCrc32c
in class BlobInfo.Builder
public Blob.Builder setCrc32cFromHexString(String crc32cHexString)
BlobInfo.Builder
setCrc32cFromHexString
in class BlobInfo.Builder
public Blob.Builder setMetadata(Map<String,String> metadata)
BlobInfo.Builder
setMetadata
in class BlobInfo.Builder
public Blob.Builder setStorageClass(StorageClass storageClass)
BlobInfo.Builder
setStorageClass
in class BlobInfo.Builder
@Deprecated public Blob.Builder setTimeStorageClassUpdated(Long timeStorageClassUpdated)
setTimeStorageClassUpdatedOffsetDateTime(OffsetDateTime)
BlobInfo.Builder
setTimeStorageClassUpdated
in class BlobInfo.Builder
public BlobInfo.Builder setTimeStorageClassUpdatedOffsetDateTime(OffsetDateTime timeStorageClassUpdated)
setTimeStorageClassUpdatedOffsetDateTime
in class BlobInfo.Builder
@Deprecated public Blob.Builder setCustomTime(Long customTime)
setCustomTimeOffsetDateTime(OffsetDateTime)
BlobInfo.Builder
Example of setting the custom time.
String bucketName = "my-unique-bucket";
String blobName = "my-blob-name";
long customTime = 1598423868301L;
BlobInfo blob = BlobInfo.newBuilder(bucketName, blobName).setCustomTime(customTime).build();
setCustomTime
in class BlobInfo.Builder
public BlobInfo.Builder setCustomTimeOffsetDateTime(OffsetDateTime customTime)
BlobInfo.Builder
Example of setting the custom time.
String bucketName = "my-unique-bucket";
String blobName = "my-blob-name";
OffsetDateTime customTime = Instant.ofEpochMilli(1598423868301L).atOffset(0); // UTC
BlobInfo blob = BlobInfo.newBuilder(bucketName, blobName).setCustomTime(customTime).build();
setCustomTimeOffsetDateTime
in class BlobInfo.Builder
public Blob.Builder setEventBasedHold(Boolean eventBasedHold)
BlobInfo.Builder
setEventBasedHold
in class BlobInfo.Builder
public Blob.Builder setTemporaryHold(Boolean temporaryHold)
BlobInfo.Builder
setTemporaryHold
in class BlobInfo.Builder
public Blob build()
BlobInfo.Builder
BlobInfo
object.build
in class BlobInfo.Builder
Copyright © 2023 Google LLC. All rights reserved.