StorageMetadata.Builder

public class StorageMetadata.Builder


Creates a StorageMetadata object.

Summary

Public constructors

Creates an empty set of metadata.

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

Public constructors

Builder

public Builder()

Creates an empty set of metadata.

Builder

public Builder(@NonNull StorageMetadata original)

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

Parameters
@NonNull StorageMetadata original

The source of the metadata to build from.

Public methods

build

public @NonNull StorageMetadata build()

getCacheControl

public @Nullable String getCacheControl()
Returns
@Nullable String

the Cache Control header for the StorageReference

getContentDisposition

public @Nullable String getContentDisposition()
Returns
@Nullable String

the content disposition for the StorageReference

getContentEncoding

public @Nullable String getContentEncoding()
Returns
@Nullable String

the content encoding for the StorageReference

getContentLanguage

public @Nullable String getContentLanguage()
Returns
@Nullable String

the content language for the StorageReference

getContentType

public @Nullable String getContentType()
Returns
@Nullable String

the Content Type of this associated StorageReference

setCacheControl

public @NonNull StorageMetadata.Builder setCacheControl(@Nullable String cacheControl)

Sets the Cache Control header for the StorageReference

Parameters
@Nullable String cacheControl

the new Cache Control setting.

setContentDisposition

public @NonNull StorageMetadata.Builder setContentDisposition(@Nullable String contentDisposition)

Changes the content disposition for the StorageReference

Parameters
@Nullable String contentDisposition

the new content disposition to use.

setContentEncoding

public @NonNull StorageMetadata.Builder setContentEncoding(@Nullable String contentEncoding)

Changes the content encoding for the StorageReference

Parameters
@Nullable String contentEncoding

the new encoding to use.

setContentLanguage

public @NonNull StorageMetadata.Builder setContentLanguage(@Nullable String contentLanguage)

Changes the content language for the StorageReference

Parameters
@Nullable String contentLanguage

the new content language.

setContentType

public @NonNull StorageMetadata.Builder setContentType(@Nullable String contentType)

Changes the content Type of this associated StorageReference

Parameters
@Nullable String contentType

the new Content Type.

setCustomMetadata

public @NonNull StorageMetadata.Builder setCustomMetadata(@NonNull String key, @Nullable String value)

Sets custom metadata

Parameters
@NonNull String key

the key of the new value

@Nullable String value

the value to set.