code: private ObjectMetadata createMetadata(int length) {
          ObjectMetadata metadata = new ObjectMetadata();
          metadata.setContentLength(length);
          if (aes256Encryption)
              metadata.setSSEAlgorithm(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION);
          return metadata;
      }
docs: Metadata object creation
  @param length
  
  @return Metadata with AES_256 encryption if enabled