NIMSDK-AOS  10.9.80
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
com.netease.nimlib.sdk.v2.message.attachment.builder.V2NIMMessageFileAttachmentBuilder类 参考

V2NIMMessageFileAttachmentBuilder更多...

Public 成员函数

V2NIMMessageFileAttachmentBuilder withPath (String path)
 设置文件路径 更多...
 
V2NIMMessageFileAttachmentBuilder withName (String name)
 设置文件名称 更多...
 
V2NIMMessageFileAttachmentBuilder withSize (long size)
 设置文件大小,如果小于0,则不设置 更多...
 
V2NIMMessageFileAttachmentBuilder withSceneName (String sceneName)
 设置文件存储场景名,默认为com.netease.nimlib.sdk.v2.storage.V2NIMStorageSceneConfig#DEFAULT_IM的getSceneName()值 更多...
 
V2NIMMessageFileAttachmentBuilder withMd5 (String md5)
 设置文件MD5 更多...
 
V2NIMMessageFileAttachmentBuilder withUrl (String url)
 设置文件URL 更多...
 
V2NIMMessageFileAttachmentBuilder withExt (String ext)
 设置文件扩展名 更多...
 
V2NIMMessageFileAttachmentImpl build ()
 构建V2NIMMessageFileAttachmentImpl实例 更多...
 

静态 Public 成员函数

static V2NIMMessageFileAttachmentBuilder builder ()
 创建一个新的V2NIMMessageFileAttachmentBuilder实例 更多...
 

详细描述

V2NIMMessageFileAttachmentBuilder

这个类用于构建文件附件消息。它使用了构建器模式,允许用户通过链式调用设置各种属性。

在文件 V2NIMMessageFileAttachmentBuilder.java11 行定义.

成员函数说明

V2NIMMessageFileAttachmentImpl com.netease.nimlib.sdk.v2.message.attachment.builder.V2NIMMessageFileAttachmentBuilder.build ( )

构建V2NIMMessageFileAttachmentImpl实例

返回
新的V2NIMMessageFileAttachmentImpl实例

在文件 V2NIMMessageFileAttachmentBuilder.java141 行定义.

static V2NIMMessageFileAttachmentBuilder com.netease.nimlib.sdk.v2.message.attachment.builder.V2NIMMessageFileAttachmentBuilder.builder ( )
static

创建一个新的V2NIMMessageFileAttachmentBuilder实例

返回
新的V2NIMMessageFileAttachmentBuilder实例

在文件 V2NIMMessageFileAttachmentBuilder.java54 行定义.

V2NIMMessageFileAttachmentBuilder com.netease.nimlib.sdk.v2.message.attachment.builder.V2NIMMessageFileAttachmentBuilder.withExt ( String  ext)

设置文件扩展名

参数
ext文件扩展名
返回
当前构建器实例

在文件 V2NIMMessageFileAttachmentBuilder.java131 行定义.

V2NIMMessageFileAttachmentBuilder com.netease.nimlib.sdk.v2.message.attachment.builder.V2NIMMessageFileAttachmentBuilder.withMd5 ( String  md5)

设置文件MD5

参数
md5文件MD5值
返回
当前构建器实例

在文件 V2NIMMessageFileAttachmentBuilder.java109 行定义.

V2NIMMessageFileAttachmentBuilder com.netease.nimlib.sdk.v2.message.attachment.builder.V2NIMMessageFileAttachmentBuilder.withName ( String  name)

设置文件名称

参数
name文件名称
返回
当前构建器实例

在文件 V2NIMMessageFileAttachmentBuilder.java75 行定义.

V2NIMMessageFileAttachmentBuilder com.netease.nimlib.sdk.v2.message.attachment.builder.V2NIMMessageFileAttachmentBuilder.withPath ( String  path)

设置文件路径

参数
path文件路径
返回
当前构建器实例

在文件 V2NIMMessageFileAttachmentBuilder.java64 行定义.

V2NIMMessageFileAttachmentBuilder com.netease.nimlib.sdk.v2.message.attachment.builder.V2NIMMessageFileAttachmentBuilder.withSceneName ( String  sceneName)

设置文件存储场景名,默认为com.netease.nimlib.sdk.v2.storage.V2NIMStorageSceneConfig#DEFAULT_IM的getSceneName()值

参数
sceneName存储场景名
返回
当前构建器实例

在文件 V2NIMMessageFileAttachmentBuilder.java98 行定义.

V2NIMMessageFileAttachmentBuilder com.netease.nimlib.sdk.v2.message.attachment.builder.V2NIMMessageFileAttachmentBuilder.withSize ( long  size)

设置文件大小,如果小于0,则不设置

参数
size文件大小(字节)
返回
当前构建器实例

在文件 V2NIMMessageFileAttachmentBuilder.java86 行定义.

V2NIMMessageFileAttachmentBuilder com.netease.nimlib.sdk.v2.message.attachment.builder.V2NIMMessageFileAttachmentBuilder.withUrl ( String  url)

设置文件URL

参数
url文件上传服务器路径
返回
当前构建器实例

在文件 V2NIMMessageFileAttachmentBuilder.java120 行定义.


该类的文档由以下文件生成: