Class Blob.BlobSourceOption (2.1.10) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 2.1.10keyboard_arrow_down  
  
 
    
    
    
      
  
  
  
    
public   static   class  Blob . BlobSourceOption   extends   Option  
  Class for specifying blob source options when Blob methods are used.
Methods
   
  decryptionKey(String key) 
  
    
public   static   Blob . BlobSourceOption   decryptionKey ( String   key )  
  Returns an option to set a customer-supplied AES256 key for server-side encryption of the
 blob.
Parameter 
  
    
      
        Name Description  
      
        key String the AES256 encoded in base64
 
     
  
  Returns 
  
  decryptionKey(Key key) 
  
    
public   static   Blob . BlobSourceOption   decryptionKey ( Key   key )  
  Returns an option to set a customer-supplied AES256 key for server-side encryption of the
 blob.
Parameter 
  
  Returns 
  
  generationMatch() 
  
    
public   static   Blob . BlobSourceOption   generationMatch ()  
  Returns an option for blob's generation match. If this option is used the request will fail
 if generation does not match.
Returns 
  
  generationNotMatch() 
  
    
public   static   Blob . BlobSourceOption   generationNotMatch ()  
  Returns an option for blob's generation mismatch. If this option is used the request will
 fail if generation matches.
Returns 
  
  
    
public   static   Blob . BlobSourceOption   metagenerationMatch ()  
  Returns an option for blob's metageneration match. If this option is used the request will
 fail if metageneration does not match.
Returns 
  
  
    
public   static   Blob . BlobSourceOption   metagenerationNotMatch ()  
  Returns an option for blob's metageneration mismatch. If this option is used the request will
 fail if metageneration matches.
Returns 
  
  
    
public   static   Blob . BlobSourceOption   shouldReturnRawInputStream ( boolean   shouldReturnRawInputStream )  
  Returns an option for whether the request should return the raw input stream, instead of
 automatically decompressing the content. By default, this is false for Blob.downloadTo(), but
 true for ReadChannel.read().
Parameter 
  
    
      
        Name Description  
      
        shouldReturnRawInputStream boolean  
     
  
  Returns 
  
  userProject(String userProject) 
  
    
public   static   Blob . BlobSourceOption   userProject ( String   userProject )  
  Returns an option for blob's billing user project. This option is used only if the blob's
 bucket has requester_pays flag enabled.
Parameter 
  
    
      
        Name Description  
      
        userProject String  
     
  
  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-11 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-11 UTC."],[],[]]