public abstract static class BlobInfo.Builder extends Object
BlobInfo
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract BlobInfo |
build()
Creates a
BlobInfo object. |
abstract BlobInfo.Builder |
setAcl(List<Acl> acl)
Sets the blob's access control configuration.
|
abstract BlobInfo.Builder |
setBlobId(BlobId blobId)
Sets the blob identity.
|
abstract BlobInfo.Builder |
setCacheControl(String cacheControl)
Sets the blob's data cache control.
|
abstract BlobInfo.Builder |
setContentDisposition(String contentDisposition)
Sets the blob's data content disposition.
|
abstract BlobInfo.Builder |
setContentEncoding(String contentEncoding)
Sets the blob's data content encoding.
|
abstract BlobInfo.Builder |
setContentLanguage(String contentLanguage)
Sets the blob's data content language.
|
abstract BlobInfo.Builder |
setContentType(String contentType)
Sets the blob's data content type.
|
abstract BlobInfo.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.
|
abstract BlobInfo.Builder |
setCrc32cFromHexString(String crc32cHexString)
Sets the CRC32C checksum of blob's data as described in RFC 4960, Appendix B; from hex
string.
|
BlobInfo.Builder |
setCustomTime(Long customTime)
Deprecated.
|
BlobInfo.Builder |
setCustomTimeOffsetDateTime(OffsetDateTime customTime)
Sets the custom time for an object.
|
abstract BlobInfo.Builder |
setEventBasedHold(Boolean eventBasedHold)
Sets the blob's event-based hold.
|
abstract BlobInfo.Builder |
setMd5(String md5)
Sets the MD5 hash of blob's data.
|
abstract BlobInfo.Builder |
setMd5FromHexString(String md5HexString)
Sets the MD5 hash of blob's data from hex string.
|
abstract BlobInfo.Builder |
setMetadata(@Nullable Map<String,String> metadata)
Sets the blob's user provided metadata.
|
abstract BlobInfo.Builder |
setStorageClass(StorageClass storageClass)
Sets the blob's storage class.
|
abstract BlobInfo.Builder |
setTemporaryHold(Boolean temporaryHold)
Sets the blob's temporary hold.
|
BlobInfo.Builder |
setTimeStorageClassUpdated(Long timeStorageClassUpdated)
Deprecated.
|
BlobInfo.Builder |
setTimeStorageClassUpdatedOffsetDateTime(OffsetDateTime timeStorageClassUpdated) |
public abstract BlobInfo.Builder setBlobId(BlobId blobId)
public abstract BlobInfo.Builder setContentType(String contentType)
public abstract BlobInfo.Builder setContentDisposition(String contentDisposition)
public abstract BlobInfo.Builder setContentLanguage(String contentLanguage)
public abstract BlobInfo.Builder setContentEncoding(String contentEncoding)
public abstract BlobInfo.Builder setCacheControl(String cacheControl)
public abstract BlobInfo.Builder setAcl(List<Acl> acl)
public abstract BlobInfo.Builder setMd5(String md5)
public abstract BlobInfo.Builder setMd5FromHexString(String md5HexString)
IllegalArgumentException
- when given an invalid hexadecimal value.public abstract BlobInfo.Builder setCrc32c(String crc32c)
@Deprecated public BlobInfo.Builder setCustomTime(Long customTime)
setCustomTimeOffsetDateTime(OffsetDateTime)
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();
public BlobInfo.Builder setCustomTimeOffsetDateTime(OffsetDateTime customTime)
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();
public abstract BlobInfo.Builder setCrc32cFromHexString(String crc32cHexString)
IllegalArgumentException
- when given an invalid hexadecimal value.public abstract BlobInfo.Builder setStorageClass(StorageClass storageClass)
@Deprecated public BlobInfo.Builder setTimeStorageClassUpdated(Long timeStorageClassUpdated)
setTimeStorageClassUpdatedOffsetDateTime(OffsetDateTime)
public BlobInfo.Builder setTimeStorageClassUpdatedOffsetDateTime(OffsetDateTime timeStorageClassUpdated)
public abstract BlobInfo.Builder setMetadata(@Nullable Map<String,String> metadata)
@BetaApi public abstract BlobInfo.Builder setEventBasedHold(Boolean eventBasedHold)
@BetaApi public abstract BlobInfo.Builder setTemporaryHold(Boolean temporaryHold)
public abstract BlobInfo build()
BlobInfo
object.Copyright © 2023 Google LLC. All rights reserved.