public class

StorageMetadata

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

Class Overview

Metadata for a StorageReference. Metadata stores default attributes such as size and content type. You may also store custom metadata key value pairs. Metadata values may be used to authorize operations using declarative validation rules.

Summary

Nested Classes
class StorageMetadata.Builder Creates a StorageMetadata object. 
Public Constructors
StorageMetadata()
Creates a StorageMetadata object to hold metadata for a StorageReference
Public Methods
String getBucket()
String getCacheControl()
String getContentDisposition()
String getContentEncoding()
String getContentLanguage()
String getContentType()
long getCreationTimeMillis()
String getCustomMetadata(String key)
Returns custom metadata for a StorageReference
Set<String> getCustomMetadataKeys()
Uri getDownloadUrl()
Returns a long lived download URL with a revokable token.
List<Uri> getDownloadUrls()
String getGeneration()
String getMd5Hash()
String getMetadataGeneration()
String getName()
String getPath()
StorageReference getReference()
long getSizeBytes()
long getUpdatedTimeMillis()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public StorageMetadata ()

Creates a StorageMetadata object to hold metadata for a StorageReference

Public Methods

public String getBucket ()

Returns

public String getCacheControl ()

Returns

public String getContentDisposition ()

Returns

public String getContentEncoding ()

Returns

public String getContentLanguage ()

Returns

public String getContentType ()

Returns

public long getCreationTimeMillis ()

Returns

public String getCustomMetadata (String key)

Returns custom metadata for a StorageReference

Parameters
key The key for which the metadata should be returned
Returns
  • the metadata stored in the object the given key.

public Set<String> getCustomMetadataKeys ()

Returns
  • the keys for custom metadata.

public Uri getDownloadUrl ()

Returns a long lived download URL with a revokable token. This can be used to share the file with others, but can be revoked by a developer in the Firebase Console if desired.

Returns
  • The Uri representing the download URL. You can feed this URL into a URL and download the object via openStream().

public List<Uri> getDownloadUrls ()

Returns

public String getGeneration ()

Returns

public String getMd5Hash ()

Returns

public String getMetadataGeneration ()

Returns

public String getName ()

Returns

public String getPath ()

Returns

public StorageReference getReference ()

Returns

public long getSizeBytes ()

Returns

public long getUpdatedTimeMillis ()

Returns