public static class

StorageMetadata.Builder

extends Object
java.lang.Object
   ↳ com.google.firebase.storage.StorageMetadata.Builder

Class Overview

Creates a StorageMetadata object.

Summary

Public Constructors
StorageMetadata.Builder()
Creates an empty set of metadata.
StorageMetadata.Builder(StorageMetadata original)
Used to create a modified version of the original set of metadata.
Public Methods
StorageMetadata build()
StorageMetadata.Builder setCacheControl(String cacheControl)
sets the Cache Control for the StorageReference
StorageMetadata.Builder setContentDisposition(String contentDisposition)
StorageMetadata.Builder setContentEncoding(String contentEncoding)
Changes the content encoding for the StorageReference
StorageMetadata.Builder setContentLanguage(String contentLanguage)
Changes the content language for the StorageReference
StorageMetadata.Builder setContentType(String contentType)
Changes the content Type of this associated StorageReference
StorageMetadata.Builder setCustomMetadata(String key, String value)
Sets custom metadata
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public StorageMetadata.Builder ()

Creates an empty set of metadata.

public StorageMetadata.Builder (StorageMetadata original)

Used to create a modified version of the original set of metadata.

Parameters
original StorageMetadata: The source of the metadata to build from.

Public Methods

public StorageMetadata build ()

Returns
StorageMetadata

public StorageMetadata.Builder setCacheControl (String cacheControl)

sets the Cache Control for the StorageReference

Parameters
cacheControl String: the new Cache Control setting.
Returns
StorageMetadata.Builder

public StorageMetadata.Builder setContentDisposition (String contentDisposition)

Parameters
contentDisposition String: changes the content disposition for the StorageReference
Returns
StorageMetadata.Builder

public StorageMetadata.Builder setContentEncoding (String contentEncoding)

Changes the content encoding for the StorageReference

Parameters
contentEncoding String: the new encoding to use.
Returns
StorageMetadata.Builder

public StorageMetadata.Builder setContentLanguage (String contentLanguage)

Changes the content language for the StorageReference

Parameters
contentLanguage String: the new content language.
Returns
StorageMetadata.Builder

public StorageMetadata.Builder setContentType (String contentType)

Changes the content Type of this associated StorageReference

Parameters
contentType String: the new Content Type.
Returns
StorageMetadata.Builder

public StorageMetadata.Builder setCustomMetadata (String key, String value)

Sets custom metadata

Parameters
key String: the key of the new value
value String: the value to set.
Returns
StorageMetadata.Builder