目录

ObjectMetadata

Class Info

public class ObjectMetadata

文件的元数据。

Method Summary

Qualifier and Type

Method Name and Description

long

getCreationTime()

获取文件创建时间。

long

getModificationTime()

获取文件修改时间。

long

getSize()

获取云端文件大小。

String

getSha256Hash()

获取上传文件时设置的SHA256值,只针对上传接口有效。

String

getContentType()

获取文件内容的类型。

String

getContentLanguage()

获取文件内容的语言类型。

String

getContentEncoding()

获取文件内容的编码类型定义。

String

getCacheControl()

获取文件的缓存规则定义。

String

getContentDisposition()

获取文件内容的本地保存定义。

Map<String, String>

getCustomMetadata()

获取自定义的文件属性。

void

setCreationTime(Date creationTime)

设置文件创建时间。

void

setCreationTime(long creationTime)

设置文件创建时间。

void

setModificationTime(Date modificationTime)

设置文件修改时间。

void

setModificationTime(long modificationTime)

设置文件修改时间。

void

setSize(long size)

设置文件大小。

void

setSha256Hash(String sha256)

设置上传文件的SHA256值,只针对上传接口有效。

void

setContentType(String contentType)

设置文件类型。

void

setContentLanguage(String contentLanguage)

设置文件的语言类型。

void

setContentEncoding(String contentEncoding)

设置文件的编码类型定义。

void

setCacheControl(String cacheControl)

设置文件的缓存规则定义。

void

setContentDisposition(String contentDisposition)

设置文件内容保存本地的规则定义。

void

setCustomMetadata(Map<String, String> metadata)

设置自定义的文件属性。

Methods

[h2]getCreationTime

Method

public long getCreationTime()

获取文件创建时间。

Return

Type

Description

long

文件创建时间。

[h2]getModificationTime

Method

public long getModificationTime()

获取文件修改时间。

Return

Type

Description

long

文件修改时间。

[h2]getSize

Method

public long getSize()

获取云端文件大小。

Return

Type

Description

long

文件大小。

[h2]getSha256Hash

Method

public String getSha256Hash()

获取上传文件时设置的SHA256值,只针对上传接口有效。

Return

Type

Description

String

文件的SHA256值。

[h2]getContentType

Method

public String getContentType()

获取文件内容的类型。

Return

Type

Description

String

文件内容的类型。

[h2]getContentLanguage

Method

public String getContentLanguage()

获取文件内容的语言类型。

Return

Type

Description

String

文件内容的语言类型。

[h2]getContentEncoding

Method

public String getContentEncoding()

获取文件内容的编码类型定义。

Return

Type

Description

String

文件内容的编码类型定义。

[h2]getCacheControl

Method

public String getCacheControl()

获取文件的缓存规则定义。

Return

Type

Description

String

文件的缓存规则定义。

[h2]getContentDisposition

Method

public String getContentDisposition()

获取文件内容的本地保存定义。

Return

Type

Description

String

文件内容的本地保存定义。

[h2]getCustomMetadata

Method

public Map<String, String> getCustomMetadata()

获取自定义的文件属性。

Return

Type

Description

String

自定义的文件属性。

[h2]setCreationTime

Method

public void setCreationTime(Date creationTime)

设置文件创建时间。

Parameters

Name

Description

creationTime

文件创建时间。

[h2]setCreationTime

Method

public void setCreationTime(long creationTime)

设置文件创建时间。

Parameters

Name

Description

creationTime

文件创建时间。

[h2]setModificationTime

Method

public void setModificationTime(Date modificationTime)

设置文件修改时间。

Parameters

Name

Description

modificationTime

文件修改时间。

[h2]setModificationTime

Method

public void setModificationTime(long modificationTime)

设置文件修改时间。

Parameters

Name

Description

modificationTime

文件修改时间。

[h2]setSize

Method

public void setSize(long size)

设置文件大小。

Parameters

Name

Description

size

文件大小。

[h2]setSha256Hash

Method

public void setSha256Hash(String sha256)

设置上传文件的SHA256值,只针对上传接口有效。

Parameters

Name

Description

sha256

文件的SHA256值。

[h2]setContentType

Method

public void setContentType(String contentType)

设置上传文件的内容类型。

Parameters

Name

Description

contentType

文件类型,详情请参见HTTP协议中关于Content-Type的定义。

[h2]setContentLanguage

Method

public void setContentLanguage(String contentLanguage)

设置上传文件的语言类型。

Parameters

Name

Description

contentLanguage

语言类型,详情请参见HTTP协议中关于Content-Language的定义。

[h2]setContentEncoding

Method

public void setContentEncoding(String contentEncoding)

设置上传文件的编码类型。

Parameters

Name

Description

contentEncoding

编码类型,详情请参见HTTP协议中关于Content-Encoding的定义。

[h2]setCacheControl

Method

public void setCacheControl(String cacheControl)

设置上传文件的缓存规则定义。

Parameters

Name

Description

cacheControl

缓存规则,详情请参见HTTP协议中关于Cache-Control的定义。

[h2]setContentDisposition

Method

public void setContentDisposition(String contentDisposition)

设置文件内容保存本地的规则定义。

Parameters

Name

Description

contentDisposition

保存本地的规则定义,详情请参见HTTP协议中关于Content-Disposition的定义。

[h2]setCustomMetadata

Method

public void setCustomMetadata(Map<String, String> metadata)

设置上传文件的自定义属性。

Parameters

Name

Description

metadata

自定义属性,需要符合标准HTTP头部的规范。