Interface ObjectChecksumsOrBuilder (2.40.1)

public interface ObjectChecksumsOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getCrc32C()

public abstract int getCrc32C()

CRC32C digest of the object data. Computed by the Cloud Storage service for all written objects. If set in a WriteObjectRequest, service will validate that the stored object matches this checksum.

optional fixed32 crc32c = 1;

Returns
Type Description
int

The crc32c.

getMd5Hash()

public abstract ByteString getMd5Hash()

128 bit MD5 hash of the object data. For more information about using the MD5 hash, see https://cloud.google.com/storage/docs/hashes-etags#json-api. Not all objects will provide an MD5 hash. For example, composite objects provide only crc32c hashes. This value is equivalent to running cat object.txt | openssl md5 -binary

bytes md5_hash = 2;

Returns
Type Description
ByteString

The md5Hash.

hasCrc32C()

public abstract boolean hasCrc32C()

CRC32C digest of the object data. Computed by the Cloud Storage service for all written objects. If set in a WriteObjectRequest, service will validate that the stored object matches this checksum.

optional fixed32 crc32c = 1;

Returns
Type Description
boolean

Whether the crc32c field is set.