Class BlobInfo.Builder (2.1.10) 
  
      
     
  
  
  
   
  
    
  
  
    
    
    
  Version 2.1.10keyboard_arrow_down  
  
 
    
    
     
    
    
    
    
    
      
  
  
  
    
public   abstract   static   class  BlobInfo . Builder  
   
  
  
  
  Constructors
   
   
  Builder() 
  
  Methods
   
   
  build() 
  
    
public   abstract   BlobInfo   build ()  
   
  Creates a BlobInfo object.
 
  Returns 
  
   
  setAcl(List<Acl> acl) 
  
    
public   abstract   BlobInfo . Builder   setAcl ( List<Acl>   acl )  
   
  Sets the blob's access control configuration.
 
  Parameter 
  
  Returns 
  
   
  setBlobId(BlobId blobId) 
  
    
public   abstract   BlobInfo . Builder   setBlobId ( BlobId   blobId )  
   
  
  Parameter 
  
    
      
        Name  
        Description  
       
      
        blobId  
        BlobId  
       
     
  
  Returns 
  
   
  setCacheControl(String cacheControl) 
  
    
public   abstract   BlobInfo . Builder   setCacheControl ( String   cacheControl )  
   
  Sets the blob's data cache control.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        cacheControl  
        String  
       
     
  
  Returns 
  
   
  setContentDisposition(String contentDisposition) 
  
    
public   abstract   BlobInfo . Builder   setContentDisposition ( String   contentDisposition )  
   
  Sets the blob's data content disposition.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        contentDisposition  
        String  
       
     
  
  Returns 
  
   
  setContentEncoding(String contentEncoding) 
  
    
public   abstract   BlobInfo . Builder   setContentEncoding ( String   contentEncoding )  
   
  Sets the blob's data content encoding.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        contentEncoding  
        String  
       
     
  
  Returns 
  
   
  setContentLanguage(String contentLanguage) 
  
    
public   abstract   BlobInfo . Builder   setContentLanguage ( String   contentLanguage )  
   
  Sets the blob's data content language.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        contentLanguage  
        String  
       
     
  
  Returns 
  
   
  setContentType(String contentType) 
  
    
public   abstract   BlobInfo . Builder   setContentType ( String   contentType )  
   
  Sets the blob's data content type.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        contentType  
        String  
       
     
  
  Returns 
  
   
  setCrc32c(String crc32c) 
  
    
public   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.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        crc32c  
        String  
       
     
  
  Returns 
  
   
  setCrc32cFromHexString(String crc32cHexString) 
  
    
public   abstract   BlobInfo . Builder   setCrc32cFromHexString ( String   crc32cHexString )  
   
  
  Parameter 
  
    
      
        Name  
        Description  
       
      
        crc32cHexString  
        String  
       
     
  
  Returns 
  
   
  setCustomTime(Long customTime) 
  
    
public   BlobInfo . 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();
  
  Parameter 
  
    
      
        Name  
        Description  
       
      
        customTime  
        Long  
       
     
  
  Returns 
  
   
  setEventBasedHold(Boolean eventBasedHold) 
  
    
public   abstract   BlobInfo . Builder   setEventBasedHold ( Boolean   eventBasedHold )  
   
  Sets the blob's event-based hold.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        eventBasedHold  
        Boolean  
       
     
  
  Returns 
  
   
  setMd5(String md5) 
  
    
public   abstract   BlobInfo . Builder   setMd5 ( String   md5 )  
   
  Sets the MD5 hash of blob's data. MD5 value must be encoded in base64.
 
  Parameter 
  
  Returns 
  
   
  setMd5FromHexString(String md5HexString) 
  
    
public   abstract   BlobInfo . Builder   setMd5FromHexString ( String   md5HexString )  
   
  Sets the MD5 hash of blob's data from hex string.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        md5HexString  
        String  
       
     
  
  Returns 
  
   
  
  
    
public   abstract   BlobInfo . Builder   setMetadata ( Map<String , String >  metadata )  
   
  Sets the blob's user provided metadata.
 
  Parameter 
  
  Returns 
  
   
  setStorageClass(StorageClass storageClass) 
  
    
public   abstract   BlobInfo . Builder   setStorageClass ( StorageClass   storageClass )  
   
  Sets the blob's storage class.
 
  Parameter 
  
  Returns 
  
   
  setTemporaryHold(Boolean temporaryHold) 
  
    
public   abstract   BlobInfo . Builder   setTemporaryHold ( Boolean   temporaryHold )  
   
  Sets the blob's temporary hold.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        temporaryHold  
        Boolean  
       
     
  
  Returns 
  
   
  setTimeStorageClassUpdated(Long timeStorageClassUpdated) 
  
    
public   BlobInfo . 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.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        timeStorageClassUpdated  
        Long  
       
     
  
  Returns 
  
 
     
    
  
  
  
     
  
 
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-30 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]