- 2.47.0 (latest)
- 2.46.0
- 2.45.0
- 2.44.1
- 2.43.2
- 2.42.0
- 2.41.0
- 2.40.1
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.1
- 2.34.0
- 2.33.0
- 2.32.1
- 2.30.1
- 2.29.1
- 2.28.0
- 2.27.1
- 2.24.0
- 2.23.0
- 2.22.6
- 2.21.0
- 2.20.2
- 2.19.0
- 2.18.0
- 2.17.2
- 2.16.0
- 2.15.1
- 2.14.0
- 2.13.1
- 2.12.0
- 2.11.3
- 2.10.0
- 2.9.3
- 2.8.1
- 2.7.1
- 2.6.1
- 2.5.1
- 2.4.5
- 2.3.0
- 2.2.3
- 2.1.10
public static class Blob.Builder extends BlobInfo.Builder
Builder for Blob
.
Methods
build()
public Blob build()
Creates a BlobInfo
object.
Type | Description |
Blob |
setAcl(List<Acl> acl)
public Blob.Builder setAcl(List<Acl> acl)
Sets the blob's access control configuration.
Name | Description |
acl | List<Acl> |
Type | Description |
Blob.Builder |
setBlobId(BlobId blobId)
public Blob.Builder setBlobId(BlobId blobId)
Sets the blob identity.
Name | Description |
blobId | BlobId |
Type | Description |
Blob.Builder |
setCacheControl(String cacheControl)
public Blob.Builder setCacheControl(String cacheControl)
Sets the blob's data cache control.
Name | Description |
cacheControl | String |
Type | Description |
Blob.Builder |
setContentDisposition(String contentDisposition)
public Blob.Builder setContentDisposition(String contentDisposition)
Sets the blob's data content disposition.
Name | Description |
contentDisposition | String |
Type | Description |
Blob.Builder |
setContentEncoding(String contentEncoding)
public Blob.Builder setContentEncoding(String contentEncoding)
Sets the blob's data content encoding.
Name | Description |
contentEncoding | String |
Type | Description |
Blob.Builder |
setContentLanguage(String contentLanguage)
public Blob.Builder setContentLanguage(String contentLanguage)
Sets the blob's data content language.
Name | Description |
contentLanguage | String |
Type | Description |
Blob.Builder |
setContentType(String contentType)
public Blob.Builder setContentType(String contentType)
Sets the blob's data content type.
Name | Description |
contentType | String |
Type | Description |
Blob.Builder |
setCrc32c(String crc32c)
public 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.
Name | Description |
crc32c | String |
Type | Description |
Blob.Builder |
setCrc32cFromHexString(String crc32cHexString)
public Blob.Builder setCrc32cFromHexString(String crc32cHexString)
Sets the CRC32C checksum of blob's data as described in RFC 4960, Appendix B; from hex string.
Name | Description |
crc32cHexString | String |
Type | Description |
Blob.Builder |
setCustomTime(Long customTime)
public Blob.Builder setCustomTime(Long customTime)
Sets the custom time for an object. Once set it can't be unset and only changed to a custom datetime in the future. To unset the custom time, you must either perform a rewrite operation or upload the data again.
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();
Name | Description |
customTime | Long |
Type | Description |
Blob.Builder |
setEventBasedHold(Boolean eventBasedHold)
public Blob.Builder setEventBasedHold(Boolean eventBasedHold)
Sets the blob's event-based hold.
Name | Description |
eventBasedHold | Boolean |
Type | Description |
Blob.Builder |
setMd5(String md5)
public Blob.Builder setMd5(String md5)
Sets the MD5 hash of blob's data. MD5 value must be encoded in base64.
Name | Description |
md5 | String |
Type | Description |
Blob.Builder |
setMd5FromHexString(String md5HexString)
public Blob.Builder setMd5FromHexString(String md5HexString)
Sets the MD5 hash of blob's data from hex string.
Name | Description |
md5HexString | String |
Type | Description |
Blob.Builder |
setMetadata(Map<String,String> metadata)
public Blob.Builder setMetadata(Map<String,String> metadata)
Sets the blob's user provided metadata.
Name | Description |
metadata | Map<String,String> |
Type | Description |
Blob.Builder |
setStorageClass(StorageClass storageClass)
public Blob.Builder setStorageClass(StorageClass storageClass)
Sets the blob's storage class.
Name | Description |
storageClass | StorageClass |
Type | Description |
Blob.Builder |
setTemporaryHold(Boolean temporaryHold)
public Blob.Builder setTemporaryHold(Boolean temporaryHold)
Sets the blob's temporary hold.
Name | Description |
temporaryHold | Boolean |
Type | Description |
Blob.Builder |
setTimeStorageClassUpdated(Long timeStorageClassUpdated)
public Blob.Builder setTimeStorageClassUpdated(Long timeStorageClassUpdated)
Sets the modification time of an object's storage class. Once set it can't be unset directly, the only way is to rewrite the object with the desired storage class.
Name | Description |
timeStorageClassUpdated | Long |
Type | Description |
Blob.Builder |