Interface ObjectChecksumsOrBuilder

All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
All Known Implementing Classes:
ObjectChecksums, ObjectChecksums.Builder

public interface ObjectChecksumsOrBuilder extends com.google.protobuf.MessageOrBuilder
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    CRC32C digest of the object data.
    com.google.protobuf.ByteString
    128 bit MD5 hash of the object data.
    boolean
    CRC32C digest of the object data.

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    isInitialized

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • hasCrc32C

      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:
      Whether the crc32c field is set.
    • getCrc32C

      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:
      The crc32c.
    • getMd5Hash

      com.google.protobuf.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][Hashes and
       ETags: Best Practices].
       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:
      The md5Hash.