Java SDK

<p class="shortdesc"></p> <section class="section" id="Java_SDK___section_p4z_s5m_qlb"><h2 class="doc-tairway">1. 简介</h2> <ul class="ul" id="Java_SDK___ul_n1k_1bn_qlb"> <li class="li">OBS Java SDK 适用于 JDK6 及以上版本;</li> <li class="li">本文档主要介绍 OBS Java SDK 的接口使用及注意事项;</li> <li class="li">并且假设您是平安云用户,且已经开通了OBS服务;</li> <li class="li">如果您还没有开通或者还不了解平安云 OBS 服务,请登录<a class="xref" href="/ssr/products/OBS" target="_blank">OBS产品主页 </a>进行了解。</li> </ul> </section> <section class="section" id="Java_SDK___section_dwc_t5m_qlb"><h2 class="doc-tairway">2. SDK下载</h2> <p class="p">Java SDK 开发包最新版本 <a class="xref" href="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20201205094846-1ec41fdc9667.jar?response-content-disposition=attachment%3Bfilename%3Dpingan-obs-java-sdk-3.9.0.1.jar" target="_blank">v3.9.0.1</a>。</p> </section> <section class="section" id="Java_SDK___section_lvd_t5m_qlb"><h2 class="doc-tairway">3. API概览</h2> <table class="table" id="Java_SDK___table_o1q_bbn_qlb"><caption></caption><colgroup><col style="width:40.322580645161295%"><col style="width:59.67741935483871%"></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_o1q_bbn_qlb__entry__1"> <p class="p">API</p> </th> <th class="entry" id="Java_SDK___table_o1q_bbn_qlb__entry__2"> <p class="p">描述</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getFromConfigFile</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">初始化服务</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getFromConfigObject</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">初始化服务</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">putObject</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">以 File 对象上传对象存储,若对象存在则更新。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">batchPutObject</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">同时上传多个 File 对象到 OBS。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">putObjectMultipart</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">对于大文件上传,可以切分成片上传。在以下情况下,应该考虑使用分片上传:</p> <ul class="ul" id="Java_SDK___ul_p1q_bbn_qlb"> <li class="li">文件大于 100M</li> <li class="li">网络环境差,上传易导致失败</li> <li class="li">需要支持断点续传</li> </ul> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">abortMultipartUpload</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">分片上传的接口中,当参数 MutilpartUploadFileRequest 的 enableCheckpoint 被设置成 true 时(默认为true),断点续传功能被开启。断点续传允许重试失败的分片,而不需重传已经成功的分片。分片上传会在客户端的文件系统中创建一个分片记录(.ucp)文件。开启断点续传功能后,上传会读取该文件中的记录,而只传还未完成的分片;若此记录文件不存在,则会创建该记录文件,并从头开始上传文件。 由于分片上传的每个片会驻留在 OBS 中,直到所有分片上传完成且执行 complete 操作。未执行 complete 操作的上传,其相关的分片将占用存储资源。用户需要调用取消分片上传的接口来删除这些分片。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">putAndCompressObject</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">将File对象进行压缩上传到对象存储,若对象存在则更新。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getObject</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">下载指定对象,此方法将占用一个Http连接,在Content读取完毕或显示关闭时释放连接。若仅为了获得对象的描述信息而非内容,请使用headObject接口。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getSignedUrl</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">获取对象的已签名的下载 URL。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getImageViewUrl</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">获取图片处理下载链接。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">batchGetObject</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">根据多个文件的 objectKey 同时下载多个文件。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getAndUncompressObject</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">解压指定objectKey对象,然后进行下载。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">listObjects</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">查询bucket下的对象列表。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">headObject</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">获得对象描述信息以及自定义元数据。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">deleteObject</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">删除指定对象。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">encryptFile</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">客户端加密是指用户数据在发送给远端服务器之前,通过SDK完成加密,而加密所用的密钥由用户方自己保存,从而可以保证用户数据安全和密钥唯一性,即使数据泄漏别人也无法解密得到原始数据。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">encryptInputStream</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">客户端加密是指用户数据在发送给远端服务器之前,通过SDK完成加密,而加密所用的密钥由用户方自己保存,从而可以保证用户数据安全和密钥唯一性,即使数据泄漏别人也无法解密得到原始数据。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">decryptFile</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">客户端解密是指用户从OBS服务器获取密文后,在客户端进行数据解密。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">decryptInputStream</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">客户端解密是指用户从OBS服务器获取密文后,在客户端进行数据解密。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getImageView</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">格式转换,获取适配图片,支持格式 jpeg,tiff, gif, bmp, png ,其中 gif 格式只会保留第一帧图片,此方法将占用一个 Http 连接,在 Content 读取完毕或显示关闭时释放连接。参数 width 和 height 至少需传入一个,不能同时为 0。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getThumbnail</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">根据自定义规则获取缩略图或视频截图,缩略图支持格式jpeg, tiff, gif, bmp, png,截图支持格式: jpg和png,此法将占用一个Http连接,在Content读取完毕或显示关闭时释放连接。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getCutImage</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">根据宽度和高度获取剪切图,先截取图片左边和上边,截取到一定大小后(比较小的时候),会截取四边,保留中间部分,当设定值大于图片实际宽、高时,会根据实际大小裁剪,支持 jpeg, tiff, gif, bmp, emf, exif, wmf, icon, png, memoryBmp, webp。此方法将占用一个 Http 连接,在 Content 读取完毕或显示关闭时释放连接。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getImageInfo</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">获取指定图片信息</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">transCodingMedia</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">媒体转码,此方法将占用一个 Http 连接,在 Content 读取完毕或显示关闭时释放连接。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getVedioFrame</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">获取视频截图,此方法将占用一个 Http 连接,在 Content 读取完毕或显示关闭时释放连接。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">getMediaInfo</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">获取媒体对象的信息。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">queryMediaByCKs</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">获取 media 转码记录,用于查询转码进度。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">deleteMediaByCK</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">根据转换后新生成的 key 删除 media 转码记录及转码后的 object。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">pfop</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">图片、音视频异步处理并持久化。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__1 "> <p class="p">prefop</p> </td> <td class="entry" headers="Java_SDK___table_o1q_bbn_qlb__entry__2 "> <p class="p">操作pfop操作进度和操作结果。</p> </td> </tr> </tbody></table> </section> <section class="section" id="Java_SDK___section_jh2_t5m_qlb"><h2 class="doc-tairway">4. API描述</h2> <p class="p"><strong class="ph b">(1)初始化服务</strong></p> <p class="p"><strong class="ph b">描述</strong></p> <p class="p">RadosgwService 是 OBS 服务的 JAVA 客户端,它为调用者提供一系列与 OBS 进行交互的接口,用于上传下载文件,加密解密文件,处理图片,音视频文件等。用户在调用 SDK 接口前<strong class="ph b">必须</strong>先初始化 RadosgwService 服务。</p> <p class="p">基本<strong class="ph b">配置文件</strong>创建服务实例:</p> <ul class="ul" id="Java_SDK___ul_hrm_dbn_qlb"> <li class="li"> <p class="p">基于 <strong class="ph b">ObsClientConfig 接口对象</strong>创建服务实例:</p> <pre xmlns:version="java:net.sf.saxon.Version" class="pre codeblock language-java">String configFileName = <your config file name>; RadosgwService service = RadosgwServiceFactory. getFromConfigFile(configFileName);</pre> <p class="p">将配置文件信息放在 classpath 下,作为 configFileName.properties 文件存放。</p> <pre xmlns:version="java:net.sf.saxon.Version" class="pre codeblock language-java">access_id = theAccessId security_id = theSecurityId rgw_addr = theObsEndPoint</pre> </li> <li class="li">基于 <strong class="ph b">ObsClientConfig 接口对象</strong>创建服务实例:<pre xmlns:version="java:net.sf.saxon.Version" class="pre codeblock language-java">ObsClientConfig oc = <strong class="hl-keyword" style="color:#7f0055">new</strong> ObsClientConfig() { <strong class="hl-keyword" style="color:#7f0055">public</strong> String getUserAgent() { &nbsp;&nbsp;&nbsp; <strong class="hl-keyword" style="color:#7f0055">return</strong> <span class="hl-string" style="color:#2a00ff">"<your system name>"</span>; &nbsp; } &nbsp; <strong class="hl-keyword" style="color:#7f0055">public</strong> String getObsUrl() { &nbsp;&nbsp;&nbsp; <strong class="hl-keyword" style="color:#7f0055">return</strong> <span class="hl-string" style="color:#2a00ff">"<theObsEndPoint>"</span>; &nbsp; } &nbsp; <strong class="hl-keyword" style="color:#7f0055">public</strong> String getObsAccessKey() { &nbsp;&nbsp;&nbsp; <strong class="hl-keyword" style="color:#7f0055">return</strong> <span class="hl-string" style="color:#2a00ff">"<theAccessId>"</span>; &nbsp; } &nbsp; <strong class="hl-keyword" style="color:#7f0055">public</strong> String getObsSecret() { &nbsp;&nbsp;&nbsp; <strong class="hl-keyword" style="color:#7f0055">return</strong> <span class="hl-string" style="color:#2a00ff">"<theSecurityId>"</span>; &nbsp; } }; RadosgwService service = RadosgwServiceFactory.getFromConfigObject(oc);</pre><div class="note note note_note"><span class="note__title">说明:</span> <p class="p">theObsEndPoint请从OBS控制台去获取endpoint,建议使用https 的请求,如"https://obs-cn-shenzhen.yun.pingan.com"。</p> </div></li> </ul> <p class="p"><strong class="ph b">(2) putObject(文件上传)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">以 File 对象上传对象存储,若对象存在则更新。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_irm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_irm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_irm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_irm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_irm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_irm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__5 "><p class="p">需自行实现策略保证同一 bucket 下 objectKey唯一, 首字符不能为路径符。</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__1 "><p class="p">localFile</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__2 "><p class="p">File</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__4 "><p class="p">待上传的文件对象</p></td> <td class="entry" headers="Java_SDK___table_irm_dbn_qlb__entry__5 "><p class="p">不能超过 1GB</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_jrm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_jrm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_jrm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_jrm_dbn_qlb__entry__3"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_jrm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_jrm_dbn_qlb__entry__1 "><p class="p">putObjectResult </p></td> <td class="entry" headers="Java_SDK___table_jrm_dbn_qlb__entry__2 "><p class="p">PutObjectResult </p></td> <td class="entry" headers="Java_SDK___table_jrm_dbn_qlb__entry__3 "><p class="p">PutObjectResult 对象</p></td> <td class="entry" headers="Java_SDK___table_jrm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(3) putObject(文件上传)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">以 File 对象上传对象存储并附带自定义元数据,若对象存在则更新。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_krm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_krm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_krm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_krm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_krm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_krm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__5 "><p class="p">需自行实现策略保证同一 bucket 下 objectKey唯一, 首字符不能为路径符。</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__1 "><p class="p">localFile</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__2 "><p class="p">File</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__4 "><p class="p">待上传的文件对象</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__5 "><p class="p">不能超过 1GB</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__1 "><p class="p">metadata</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__2 "><p class="p">ObjectMetadata</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__4 "><p class="p">自定义元数据</p></td> <td class="entry" headers="Java_SDK___table_krm_dbn_qlb__entry__5 "><p class="p">key-value 格式,key 只允许使用大写字母、数字、中横线</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_lrm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_lrm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_lrm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_lrm_dbn_qlb__entry__3"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_lrm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_lrm_dbn_qlb__entry__1 "><p class="p">putObjectResult </p></td> <td class="entry" headers="Java_SDK___table_lrm_dbn_qlb__entry__2 "><p class="p">PutObjectResult </p></td> <td class="entry" headers="Java_SDK___table_lrm_dbn_qlb__entry__3 "><p class="p">PutObjectResult 对象</p></td> <td class="entry" headers="Java_SDK___table_lrm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(4) putObject(流式上传)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">以 InputStream 形式上传对象存储,若对象存在则更新,建议仅用于上传较小的对象<strong class="ph b">。</strong></p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_mrm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_mrm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_mrm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_mrm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_mrm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_mrm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__5 "><p class="p">需自行实现策略保证同一 bucket 下 objectKey唯一, 首字符不能为路径符。</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__1 "><p class="p">inputStream</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__2 "><p class="p">InputStream</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__4 "><p class="p">待上传的流</p></td> <td class="entry" headers="Java_SDK___table_mrm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_nrm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_nrm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_nrm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_nrm_dbn_qlb__entry__3"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_nrm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_nrm_dbn_qlb__entry__1 "><p class="p">putObjectResult </p></td> <td class="entry" headers="Java_SDK___table_nrm_dbn_qlb__entry__2 "><p class="p">PutObjectResult </p></td> <td class="entry" headers="Java_SDK___table_nrm_dbn_qlb__entry__3 "><p class="p">PutObjectResult 对象</p></td> <td class="entry" headers="Java_SDK___table_nrm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(5) putObject(流式上传)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">以 InputStream 形式上传对象存储并附带对象元数据,若对象存在则更新,大、小对象上传均适用<strong class="ph b">。</strong></p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_orm_dbn_qlb"><caption></caption><colgroup><col style="width:21.54696132596685%"><col style="width:19.152854511970535%"><col style="width:18.41620626151013%"><col style="width:20.994475138121548%"><col style="width:19.88950276243094%"></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_orm_dbn_qlb__entry__1"> <p class="p">参数名称</p> </th> <th class="entry" id="Java_SDK___table_orm_dbn_qlb__entry__2"> <p class="p">参数类型</p> </th> <th class="entry" id="Java_SDK___table_orm_dbn_qlb__entry__3"> <p class="p">是否必须</p> </th> <th class="entry" id="Java_SDK___table_orm_dbn_qlb__entry__4"> <p class="p">参数描述</p> </th> <th class="entry" id="Java_SDK___table_orm_dbn_qlb__entry__5"> <p class="p">备注</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__1 "> <p class="p">bucket</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__4 "> <p class="p">保存对象的 bucket 名称</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__1 "> <p class="p">objectKey</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__4 "> <p class="p">对象 Key</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__5 "> <p class="p">需自行实现策略保证同一 bucket 下 objectKey唯一, 首字符不能为路径符。</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__1 "> <p class="p">inputStream</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__2 "> <p class="p">InputStream</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__4 "> <p class="p">待上传的流</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__1 "> <p class="p">metadata</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__2 "> <p class="p">ObjectMetadata</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__4 "> <p class="p">自定义元数据</p> </td> <td class="entry" headers="Java_SDK___table_orm_dbn_qlb__entry__5 "> <p class="p">key-value 格式,key 只允许使用小写字母、数字、中横线。建议指定 ContentLength,若不指定,流会被首先全部读取到内存再做上传;建议指定 contentType,若不指定,会赋予默认类型 application/octet-stream。</p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_prm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_prm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_prm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_prm_dbn_qlb__entry__3"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_prm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_prm_dbn_qlb__entry__1 "><p class="p">putObjectResult </p></td> <td class="entry" headers="Java_SDK___table_prm_dbn_qlb__entry__2 "><p class="p">PutObjectResult </p></td> <td class="entry" headers="Java_SDK___table_prm_dbn_qlb__entry__3 "><p class="p">PutObjectResult 对象</p></td> <td class="entry" headers="Java_SDK___table_prm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(6) batchPutObject(批量上传)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">同时上传多个 File 对象到 OBS。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_qrm_dbn_qlb"><caption></caption><colgroup><col style="width:20%"><col style="width:21.344537815126053%"><col style="width:16.80672268907563%"><col style="width:21.848739495798323%"><col style="width:20%"></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_qrm_dbn_qlb__entry__1"> <p class="p">参数名称</p> </th> <th class="entry" id="Java_SDK___table_qrm_dbn_qlb__entry__2"> <p class="p">参数类型</p> </th> <th class="entry" id="Java_SDK___table_qrm_dbn_qlb__entry__3"> <p class="p">是否必须</p> </th> <th class="entry" id="Java_SDK___table_qrm_dbn_qlb__entry__4"> <p class="p">参数描述</p> </th> <th class="entry" id="Java_SDK___table_qrm_dbn_qlb__entry__5"> <p class="p">备注</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_qrm_dbn_qlb__entry__1 "> <p class="p">bucket</p> </td> <td class="entry" headers="Java_SDK___table_qrm_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_qrm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_qrm_dbn_qlb__entry__4 "> <p class="p">保存对象的 bucket 名称</p> </td> <td class="entry" headers="Java_SDK___table_qrm_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_qrm_dbn_qlb__entry__1 "> <p class="p">batchPutFiles</p> </td> <td class="entry" headers="Java_SDK___table_qrm_dbn_qlb__entry__2 "> <p class="p">BatchPutFile[]</p> </td> <td class="entry" headers="Java_SDK___table_qrm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_qrm_dbn_qlb__entry__4 "> <p class="p">批量上传的文件对象数组</p> </td> <td class="entry" headers="Java_SDK___table_qrm_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_rrm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_rrm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_rrm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_rrm_dbn_qlb__entry__3"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_rrm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_rrm_dbn_qlb__entry__1 "><p class="p">BatchPutObjectResults</p></td> <td class="entry" headers="Java_SDK___table_rrm_dbn_qlb__entry__2 "><p class="p">List<BatchPutObjectResult></p></td> <td class="entry" headers="Java_SDK___table_rrm_dbn_qlb__entry__3 "> <p class="p">每个 BatchPutObjectResult 对象中包含该文件上传信息(比如上传是否成功,上传失败原因,文件 MD5 值等)。</p> </td> <td class="entry" headers="Java_SDK___table_rrm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(7) putObjectMultipart(分片上传)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">对于大文件上传,可以切分成片上传。在以下情况下,应该考虑使用分片上传:</p> <ul class="ul" id="Java_SDK___ul_srm_dbn_qlb"> <li class="li">文件大于 100M</li> <li class="li">网络环境差,上传易导致失败</li> <li class="li">需要支持断点续传</li> </ul> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_trm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_trm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_trm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_trm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_trm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_trm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_trm_dbn_qlb__entry__1 "><p class="p">uploadFileRequest</p></td> <td class="entry" headers="Java_SDK___table_trm_dbn_qlb__entry__2 "><p class="p">MutilpartUploadFileRequest </p></td> <td class="entry" headers="Java_SDK___table_trm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_trm_dbn_qlb__entry__4 "> <p class="p">分片上传参数 uploadFileRequest 说明:</p> <ul class="ul" id="Java_SDK___ul_urm_dbn_qlb"> <li class="li">每个分片(除了最后一个分片)的大小必须不小于 5M,最后一个分片的大小无限制;</li> <li class="li">若任何一个分片(非最后一个分片)小于 5M,每个分片的上传不会失败,然而分片完成操作(complete)会失败。</li> <li class="li">enableCheckpoint 用于设置是否启用断点续传。默认启用。通过调用 uploadFileRequest.setEnableCheckpoint(false) 关闭断点续传功能。</li> <li class="li">checkpointFile 用于设置断点续传 ucp 文件的保存位置。默认与待上传文件位于同一个目录下面。若非特殊需求,不需要更改此设置。</li> <li class="li">uploadNotifier 用于设置分片上传的通知接收者。可以实现一个 MutilpartUploadNotifier,并调用 uploadFileRequest.setUploadNotifier 来接收分片上传的进展的通知,以达到如进度感知等目的。</li> <li class="li">一般情况下,应当开启 enabledMd5 来保证文件内容的完整性(默认开启)。</li> </ul> <p class="p">分片上传相较于 s3 已经简化了使用步骤。仅需要调用一个接口。</p> </td> <td class="entry" headers="Java_SDK___table_trm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <p class="p">无</p> <p class="p"><strong class="ph b">(8) abortMultipartUpload(取消分片上传)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">取消分片上传。分片上传的接口中,当参数 MutilpartUploadFileRequest 的 enableCheckpoint 被设置成 true 时(默认为true),断点续传功能被开启。断点续传允许重试失败的分片,而不需重传已经成功的分片。分片上传会在客户端的文件系统中创建一个分片记录(.ucp)文件。开启断点续传功能后,上传会读取该文件中的记录,而只传还未完成的分片;若此记录文件不存在,则会创建该记录文件,并从头开始上传文件。 由于分片上传的每个片会驻留在 OBS 中,直到所有分片上传完成且执行 complete 操作。未执行 complete 操作的上传,其相关的分片将占用存储资源。用户需要调用取消分片上传的接口来删除这些分片。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_wrm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_wrm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_wrm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_wrm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_wrm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_wrm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_wrm_dbn_qlb__entry__1 "><p class="p">abortRequest </p></td> <td class="entry" headers="Java_SDK___table_wrm_dbn_qlb__entry__2 "><p class="p">AbortMutilpartUploadRequest</p></td> <td class="entry" headers="Java_SDK___table_wrm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_wrm_dbn_qlb__entry__4 "> <p class="p">初始化</p> <p class="p">abortRequest参数需传入: </p> <p class="p"> bucket: 对象的 bucket 名称</p> <p class="p">objectKey:对象 Key</p> <p class="p">uploadId: 待删除的分片所属的 upload 编号。必须实现 uploadNotifier,在对应通知中获取 uploadId</p> </td> <td class="entry" headers="Java_SDK___table_wrm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <p class="p">无</p> <p class="p"><strong class="ph b">(9) putAndCompressObject(文件压缩上传)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">将File对象进行压缩上传到对象存储,若对象存在则更新。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_yrm_dbn_qlb"><caption></caption><colgroup><col style="width:20.075046904315197%"><col style="width:18.94934333958724%"><col style="width:23.452157598499063%"><col style="width:18.76172607879925%"><col style="width:18.76172607879925%"></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_yrm_dbn_qlb__entry__1"> <p class="p">参数名称</p> </th> <th class="entry" id="Java_SDK___table_yrm_dbn_qlb__entry__2"> <p class="p">参数类型</p> </th> <th class="entry" id="Java_SDK___table_yrm_dbn_qlb__entry__3"> <p class="p">是否必须</p> </th> <th class="entry" id="Java_SDK___table_yrm_dbn_qlb__entry__4"> <p class="p">参数描述</p> </th> <th class="entry" id="Java_SDK___table_yrm_dbn_qlb__entry__5"> <p class="p">备注</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__1 "> <p class="p">bucket</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__4 "> <p class="p">保存对象的 bucket 名称</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__1 "> <p class="p">objectKey</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__4 "> <p class="p">对象 Key</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__5 "> <p class="p">需自行实现策略保证同一 bucket 下 objectKey 唯一, 不能为空,首字符不能为路径符</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__1 "> <p class="p">localFile</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__2 "> <p class="p">File</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__4 "> <p class="p">待上传的文件对象</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__5 "> <p class="p">不能超过 1GB</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__1 "> <p class="p">metadata</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__2 "> <p class="p">ObjectMetadata </p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__4 "> <p class="p">自定义元数据</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__5 "> <p class="p">key-value 格式,key 只允许使用小写字母、数字、中横线</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__1 "> <p class="p">mode</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__2 "> <p class="p">CompressMode</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__4 "> <p class="p">压缩模式,目前支持<strong class="ph b">MS,ML,ZIP,GZP,LZ4,LZO</strong>模式</p> </td> <td class="entry" headers="Java_SDK___table_yrm_dbn_qlb__entry__5 "> <p class="p"><strong class="ph b">极限模式(ML)</strong>:使用FastLZ算法对文件进行压缩/解压。FastLZ算法针对文本文件有很好压缩效果,经测试压缩率接近10%(压缩后文件大小/压缩前文件大小),同时对图片类型格式可取得较好的压缩效果,尤其对位图压缩率可以小于60%。但对于已经压缩文件和音视频文件压缩效果十分差。其压缩速度和解压速度优于传统zip方式。</p> <p class="p"><strong class="ph b">极速模式(MS)</strong>:使用SNAPPY压缩算法对文件进行压缩/解压。SNAPPY算法针对文本文件压缩/解压,压缩率15%左右,图片类中对位图压缩缩率小于60%,但其压缩/解压速度为极限压缩数度5倍以上(压缩速度最可达100M/S,解压速度可达:400M/s)。</p> <p class="p"><strong class="ph b">zip模式(ZIP)</strong>:使用JDK自带GZIP压缩算法对文件进行压缩/解压 。其详细信息参照JDK。</p> <p class="p"><strong class="ph b">GZIP压缩(GZIP)</strong>:使用JDK自带DEFLATE算法对文件进行压缩/解压 。其详细信息参照JDK。</p> <p class="p"><strong class="ph b">LZ4模式(LZ4)</strong>:使用LZ77优化后的算法LZ4对文件进行压缩/解压。其主要特点牺牲压缩率获取压缩速度。处理文本文件压缩率大于30%,图片类文件完全无法压缩。 压缩速度和解压速度略小于极速模式。</p> <p class="p"><strong class="ph b">LZO模式(LZO)</strong>:LZO 是一个用 ANSI C语言编写的无损压缩库。LZO 非常适合进行数据的实时压缩解压处理,这就是说他更关心操作速度,而不是压缩比例。压缩速度为极速模式二分之一,解压速度为极速模式四分之一。</p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_zrm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_zrm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_zrm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_zrm_dbn_qlb__entry__3"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_zrm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_zrm_dbn_qlb__entry__1 "><p class="p">putObjectResult</p></td> <td class="entry" headers="Java_SDK___table_zrm_dbn_qlb__entry__2 "><p class="p">PutObjectResult</p></td> <td class="entry" headers="Java_SDK___table_zrm_dbn_qlb__entry__3 "><p class="p">PutObjectResult对象</p></td> <td class="entry" headers="Java_SDK___table_zrm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(10)getObject(文件下载)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">下载指定对象,此方法将占用一个Http连接,在Content读取完毕或显示关闭时释放连接。若仅为了获得对象的描述信息而非内容,请使用headObject接口。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_asm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_asm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_asm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_asm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_asm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_asm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_asm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_asm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_asm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_asm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_asm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_asm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_asm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_asm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_asm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_asm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_bsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_bsm_dbn_qlb__entry__1"> <p class="p">参数名称</p> </th> <th class="entry" id="Java_SDK___table_bsm_dbn_qlb__entry__2"> <p class="p">参数类型</p> </th> <th class="entry" id="Java_SDK___table_bsm_dbn_qlb__entry__3"> <p class="p">参数描述</p> </th> <th class="entry" id="Java_SDK___table_bsm_dbn_qlb__entry__4"> <p class="p">备注</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_bsm_dbn_qlb__entry__1 "><p class="p">s3object</p></td> <td class="entry" headers="Java_SDK___table_bsm_dbn_qlb__entry__2 "><p class="p">S3Object</p></td> <td class="entry" headers="Java_SDK___table_bsm_dbn_qlb__entry__3 "><p class="p">包含对象流的 S3Object 实例,需读取 Content 自行保存</p></td> <td class="entry" headers="Java_SDK___table_bsm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(11)getSignedUrl(获取下载链接)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">获取对象的已签名的下载 URL,使用默认设置。默认有效时间为 20 秒<strong class="ph b">。</strong></p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_csm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_csm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_csm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_csm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_csm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_csm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_csm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_csm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_csm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_csm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_csm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_csm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_csm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_csm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_csm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_csm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_dsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_dsm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_dsm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_dsm_dbn_qlb__entry__3"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_dsm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_dsm_dbn_qlb__entry__1 "><p class="p">url</p></td> <td class="entry" headers="Java_SDK___table_dsm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_dsm_dbn_qlb__entry__3 "><p class="p">已签名的对象下载 url</p></td> <td class="entry" headers="Java_SDK___table_dsm_dbn_qlb__entry__4 "><p class="p">url 具有默认的有效期,下载文件名为对象 Key</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(12)getSignedUrl(获取下载链接)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">获取对象的已签名的下载 URL,指定返回 contentDisposition 头以告知浏览器如何显示文件,并使用默认的 url 有效期 20 秒<strong class="ph b">。</strong></p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_esm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_esm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_esm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_esm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_esm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_esm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__1 "><p class="p">contentDisposition</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__4 "><p class="p">在请求url时,期望云存储服务端返回的 content-disposition 头信息</p></td> <td class="entry" headers="Java_SDK___table_esm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_fsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_fsm_dbn_qlb__entry__1"> <p class="p">参数名称</p> </th> <th class="entry" id="Java_SDK___table_fsm_dbn_qlb__entry__2"> <p class="p">参数类型</p> </th> <th class="entry" id="Java_SDK___table_fsm_dbn_qlb__entry__3"> <p class="p">参数描述</p> </th> <th class="entry" id="Java_SDK___table_fsm_dbn_qlb__entry__4"> <p class="p">备注</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_fsm_dbn_qlb__entry__1 "><p class="p">url</p></td> <td class="entry" headers="Java_SDK___table_fsm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_fsm_dbn_qlb__entry__3 "><p class="p">已签名的对象下载 url</p></td> <td class="entry" headers="Java_SDK___table_fsm_dbn_qlb__entry__4 "><p class="p">已签名的对象下载 url,url 具有默认的有效期。最长 15 mins</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(13)getSignedUrl(获取下载链接)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">获取对象的已签名的下载URL,指定返回contentDisposition头以告知浏览器如何显示文件,并指定url有效期(秒)<strong class="ph b">。</strong></p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_gsm_dbn_qlb"><caption></caption><colgroup><col style="width:20.811287477954142%"><col style="width:19.75308641975309%"><col style="width:22.045855379188716%"><col style="width:17.636684303350968%"><col style="width:19.75308641975309%"></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_gsm_dbn_qlb__entry__1"> <p class="p">参数名称</p> </th> <th class="entry" id="Java_SDK___table_gsm_dbn_qlb__entry__2"> <p class="p">参数类型</p> </th> <th class="entry" id="Java_SDK___table_gsm_dbn_qlb__entry__3"> <p class="p">是否必须</p> </th> <th class="entry" id="Java_SDK___table_gsm_dbn_qlb__entry__4"> <p class="p">参数描述</p> </th> <th class="entry" id="Java_SDK___table_gsm_dbn_qlb__entry__5"> <p class="p">备注</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__1 "> <p class="p">bucket</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__4 "> <p class="p">保存对象的 bucket 名称</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__1 "> <p class="p">objectKey</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__4 "> <p class="p">对象 Key</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__1 "> <p class="p">contentDisposition</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__4 "> <p class="p">在请求url时,期望云存储服务端返回的 content-disposition 头信息</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__1 "> <p class="p">expireSeconds</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__2 "> <p class="p">long</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__4 "> <p class="p">url 有效秒数</p> </td> <td class="entry" headers="Java_SDK___table_gsm_dbn_qlb__entry__5 "> <p class="p">url 生成后,在此时间段内有效,过期的 url 会被云存储拒绝访问</p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_hsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_hsm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_hsm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_hsm_dbn_qlb__entry__3"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_hsm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_hsm_dbn_qlb__entry__1 "><p class="p">url</p></td> <td class="entry" headers="Java_SDK___table_hsm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_hsm_dbn_qlb__entry__3 "><p class="p">已签名的对象下载 url</p></td> <td class="entry" headers="Java_SDK___table_hsm_dbn_qlb__entry__4 "></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(14)getImageViewUrl(获取图片处理下载链接)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">获取图片处理下载链接<strong class="ph b">。</strong></p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_ism_dbn_qlb"><caption></caption><colgroup><col style="width:20.783645655877343%"><col style="width:22.657580919931856%"><col style="width:17.035775127768314%"><col style="width:19.761499148211243%"><col style="width:19.761499148211243%"></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ism_dbn_qlb__entry__1"> <p class="p">字段名称</p> </th> <th class="entry" id="Java_SDK___table_ism_dbn_qlb__entry__2"> <p class="p">字段类型</p> </th> <th class="entry" id="Java_SDK___table_ism_dbn_qlb__entry__3"> <p class="p">是否必须</p> </th> <th class="entry" id="Java_SDK___table_ism_dbn_qlb__entry__4"> <p class="p">字段描述</p> </th> <th class="entry" id="Java_SDK___table_ism_dbn_qlb__entry__5"> <p class="p">备注</p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__1 "> <p class="p">bucketName</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__4 "> <p class="p">保存对象的 bucket 名称</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__5 "> <p class="p">- </p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__1 "> <p class="p">objectKey</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__4 "> <p class="p">对象 Key</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__1 "> <p class="p">contentDisposition</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__4 "> <p class="p">在请求url时,期望云存储服务端返回的 content-disposition 头信息,默认为null</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__5 "> <p class="p">- </p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__1 "> <p class="p">expireSeconds</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__2 "> <p class="p">long</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__4 "> <p class="p">url有效秒数,url生成后,在此时间段内有效,过期的url会被云存储拒绝访问,默认为20s</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__1 "> <p class="p">formatOps</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__4 "> <p class="p">参数是必须的,但需要设置为空NULL。</p> </td> <td class="entry" headers="Java_SDK___table_ism_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_jsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_jsm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_jsm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_jsm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_jsm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_jsm_dbn_qlb__entry__1 "><p class="p">url</p></td> <td class="entry" headers="Java_SDK___table_jsm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_jsm_dbn_qlb__entry__3 "><p class="p">已签名的图片处理下载链接</p></td> <td class="entry" headers="Java_SDK___table_jsm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(15)batchGetObject(批量下载)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">根据多个文件的 objectKey 同时下载多个文件。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_ksm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ksm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_ksm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_ksm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_ksm_dbn_qlb__entry__4"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_ksm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ksm_dbn_qlb__entry__1 "><p class="p">bucketName</p></td> <td class="entry" headers="Java_SDK___table_ksm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ksm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ksm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_ksm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ksm_dbn_qlb__entry__1 "><p class="p">objectKeys</p></td> <td class="entry" headers="Java_SDK___table_ksm_dbn_qlb__entry__2 "><p class="p">String[]</p></td> <td class="entry" headers="Java_SDK___table_ksm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ksm_dbn_qlb__entry__4 "><p class="p"> objectKey 数组</p></td> <td class="entry" headers="Java_SDK___table_ksm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_lsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_lsm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_lsm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_lsm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_lsm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_lsm_dbn_qlb__entry__1 "><p class="p">batchS3ObjectList</p></td> <td class="entry" headers="Java_SDK___table_lsm_dbn_qlb__entry__2 "><p class="p">List<BatchS3Object></p></td> <td class="entry" headers="Java_SDK___table_lsm_dbn_qlb__entry__3 "><p class="p">批量下载完毕后,SDK 将返回结果对象 List,循环该 List 去得到每个文件下载后的对象,该对象中包含所下载文件的文件流,另外还有该文件下载时的信息(比如下载是否成功,下载失败原因,文件 MD5 值等。)</p></td> <td class="entry" headers="Java_SDK___table_lsm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(16)getAndUncompressObject(文件解压下载)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">解压指定objectKey对象,然后进行下载。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_msm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_msm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_msm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_msm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_msm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_msm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_msm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_msm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_msm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_msm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_msm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_msm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_msm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_msm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_msm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_msm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_nsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_nsm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_nsm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_nsm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_nsm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_nsm_dbn_qlb__entry__1 "><p class="p">s3Object</p></td> <td class="entry" headers="Java_SDK___table_nsm_dbn_qlb__entry__2 "><p class="p">S3Object</p></td> <td class="entry" headers="Java_SDK___table_nsm_dbn_qlb__entry__3 "><p class="p">包含对象流的 S3Object 实例,需读取 Content 自行保存</p></td> <td class="entry" headers="Java_SDK___table_nsm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(17)listObjects(查询bucket下的对象列表)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">查询bucket下的对象列表。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_osm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_osm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_osm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_osm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_osm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_osm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_osm_dbn_qlb__entry__1 "><p class="p">listObjectsRequest</p></td> <td class="entry" headers="Java_SDK___table_osm_dbn_qlb__entry__2 "><p class="p">ListObjectsRequest </p></td> <td class="entry" headers="Java_SDK___table_osm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_osm_dbn_qlb__entry__4 "> <p class="p">listObjectsRequest: 查询参数:</p> <p class="p">listObjectsRequest.delimiter 一个用于对KEY进行分组的字符。如果查询参数中指定了prefix,则在查询结果中,对KEY计算从prefix到第一次匹配delimiter的位置的截取串,所有KEY按此截取串进行分组且将结果放于元素CommonPrefixes下;若未指定prefix,则截取从KEY的开始位置执行计算。CommonPrefixes下面的KEY将不会在出现在查询结果中的其它位置。</p> <p class="p">listObjectsRequest.marker指定查询KEY的起始位置(不包括此KEY)。</p> <p class="p">listObjectsRequest. max-keys 查询结果最大Key的数量,默认为1000。</p> <p class="p">listObjectsRequest.prefix指定查询前缀。</p> </td> <td class="entry" headers="Java_SDK___table_osm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_psm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_psm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_psm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_psm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_psm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_psm_dbn_qlb__entry__1 "><p class="p">objectListing</p></td> <td class="entry" headers="Java_SDK___table_psm_dbn_qlb__entry__2 "><p class="p">ObjectListing</p></td> <td class="entry" headers="Java_SDK___table_psm_dbn_qlb__entry__3 "> <p class="p">查询结果:</p> <p class="p">ObjectListing .isTruncated 查询结果是否被截取。若被截取,则表示查询还有下一页。</p> <p class="p">ObjectListing. nextMarker 下一页的mark。<strong class="ph b">注意:</strong>此字段仅在请求中包含了delimiter参数时才会出现在响应中。否则,应该取响应中的KEY列表(object Summarie</p> <p class="p">s)的最后一个元素作为下一页请求的mark参数。</p> </td> <td class="entry" headers="Java_SDK___table_psm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(18)headObject(获取文件信息)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">获得对象描述信息以及自定义元数据</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_qsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_qsm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_qsm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_qsm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_qsm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_qsm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_qsm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_qsm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_qsm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_qsm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_qsm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_qsm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_qsm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_qsm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_qsm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_qsm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_rsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_rsm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_rsm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_rsm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_rsm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_rsm_dbn_qlb__entry__1 "><p class="p">objectMetadata</p></td> <td class="entry" headers="Java_SDK___table_rsm_dbn_qlb__entry__2 "><p class="p">ObjectMetadata</p></td> <td class="entry" headers="Java_SDK___table_rsm_dbn_qlb__entry__3 "><p class="p">对象元数据 ObjectMetadata</p></td> <td class="entry" headers="Java_SDK___table_rsm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(19)deleteObject(删除Object)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">删除指定对象</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_ssm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ssm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_ssm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_ssm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_ssm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_ssm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ssm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_ssm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ssm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ssm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_ssm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ssm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_ssm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ssm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ssm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_ssm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <p class="p">无</p> <p class="p"><strong class="ph b">(20)encryptFile(加密文件)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">客户端加密是指用户数据在发送给远端服务器之前,通过SDK完成加密,而加密所用的密钥由用户方自己保存,从而可以保证用户数据安全和密钥唯一性,即使数据泄漏别人也无法解密得到原始数据。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_usm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_usm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_usm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_usm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_usm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_usm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_usm_dbn_qlb__entry__1 "><p class="p">file </p></td> <td class="entry" headers="Java_SDK___table_usm_dbn_qlb__entry__2 "><p class="p">File </p></td> <td class="entry" headers="Java_SDK___table_usm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_usm_dbn_qlb__entry__4 "><p class="p">文件对象</p></td> <td class="entry" headers="Java_SDK___table_usm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_usm_dbn_qlb__entry__1 "><p class="p">keySource</p></td> <td class="entry" headers="Java_SDK___table_usm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_usm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_usm_dbn_qlb__entry__4 "><p class="p">加密文件用的密钥</p></td> <td class="entry" headers="Java_SDK___table_usm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_vsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_vsm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_vsm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_vsm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_vsm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_vsm_dbn_qlb__entry__1 "><p class="p">inputStream</p></td> <td class="entry" headers="Java_SDK___table_vsm_dbn_qlb__entry__2 "><p class="p">InputStream</p></td> <td class="entry" headers="Java_SDK___table_vsm_dbn_qlb__entry__3 "><p class="p">文件加密流</p></td> <td class="entry" headers="Java_SDK___table_vsm_dbn_qlb__entry__4 "></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(21)encryptInputStream(加密文件流)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">客户端加密是指用户数据在发送给远端服务器之前,通过SDK完成加密,而加密所用的密钥由用户方自己保存,从而可以保证用户数据安全和密钥唯一性,即使数据泄漏别人也无法解密得到原始数据。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_wsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_wsm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_wsm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_wsm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_wsm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_wsm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_wsm_dbn_qlb__entry__1 "><p class="p">inputStream</p></td> <td class="entry" headers="Java_SDK___table_wsm_dbn_qlb__entry__2 "><p class="p">InputStream</p></td> <td class="entry" headers="Java_SDK___table_wsm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_wsm_dbn_qlb__entry__4 "><p class="p">文件流</p></td> <td class="entry" headers="Java_SDK___table_wsm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_wsm_dbn_qlb__entry__1 "><p class="p">keySource</p></td> <td class="entry" headers="Java_SDK___table_wsm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_wsm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_wsm_dbn_qlb__entry__4 "><p class="p">加密文件用的密钥</p></td> <td class="entry" headers="Java_SDK___table_wsm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_xsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_xsm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_xsm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_xsm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_xsm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_xsm_dbn_qlb__entry__1 "><p class="p">inputStream</p></td> <td class="entry" headers="Java_SDK___table_xsm_dbn_qlb__entry__2 "><p class="p">InputStream</p></td> <td class="entry" headers="Java_SDK___table_xsm_dbn_qlb__entry__3 "><p class="p">文件加密流</p></td> <td class="entry" headers="Java_SDK___table_xsm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(22)decryptFile(解密文件)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">客户端解密是指用户从OBS服务器获取密文后,在客户端进行数据解密。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_ysm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ysm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_ysm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_ysm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_ysm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_ysm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ysm_dbn_qlb__entry__1 "><p class="p">file </p></td> <td class="entry" headers="Java_SDK___table_ysm_dbn_qlb__entry__2 "><p class="p">File </p></td> <td class="entry" headers="Java_SDK___table_ysm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ysm_dbn_qlb__entry__4 "><p class="p">文件对象</p></td> <td class="entry" headers="Java_SDK___table_ysm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ysm_dbn_qlb__entry__1 "><p class="p">keySource</p></td> <td class="entry" headers="Java_SDK___table_ysm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ysm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ysm_dbn_qlb__entry__4 "><p class="p">加密文件用的密钥</p></td> <td class="entry" headers="Java_SDK___table_ysm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_zsm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_zsm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_zsm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_zsm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_zsm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_zsm_dbn_qlb__entry__1 "><p class="p">inputStream</p></td> <td class="entry" headers="Java_SDK___table_zsm_dbn_qlb__entry__2 "><p class="p">InputStream</p></td> <td class="entry" headers="Java_SDK___table_zsm_dbn_qlb__entry__3 "><p class="p">文件解密流</p></td> <td class="entry" headers="Java_SDK___table_zsm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(23)decryptInputStream(解密文件流)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">客户端解密是指用户从OBS服务器获取密文后,在客户端进行数据解密。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_atm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_atm_dbn_qlb__entry__1"><p class="p"><strong class="ph b">参数名称</strong></p></th> <th class="entry" id="Java_SDK___table_atm_dbn_qlb__entry__2"><p class="p"><strong class="ph b">参数类型</strong></p></th> <th class="entry" id="Java_SDK___table_atm_dbn_qlb__entry__3"><p class="p"><strong class="ph b">是否必须</strong></p></th> <th class="entry" id="Java_SDK___table_atm_dbn_qlb__entry__4"><p class="p"><strong class="ph b">参数描述</strong></p></th> <th class="entry" id="Java_SDK___table_atm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_atm_dbn_qlb__entry__1 "><p class="p">inputStream</p></td> <td class="entry" headers="Java_SDK___table_atm_dbn_qlb__entry__2 "><p class="p">InputStream</p></td> <td class="entry" headers="Java_SDK___table_atm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_atm_dbn_qlb__entry__4 "><p class="p">文件流</p></td> <td class="entry" headers="Java_SDK___table_atm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_atm_dbn_qlb__entry__1 "><p class="p">keySource</p></td> <td class="entry" headers="Java_SDK___table_atm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_atm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_atm_dbn_qlb__entry__4 "><p class="p">加密文件用的密钥</p></td> <td class="entry" headers="Java_SDK___table_atm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_btm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_btm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_btm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_btm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_btm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_btm_dbn_qlb__entry__1 "><p class="p">inputStream</p></td> <td class="entry" headers="Java_SDK___table_btm_dbn_qlb__entry__2 "><p class="p">InputStream</p></td> <td class="entry" headers="Java_SDK___table_btm_dbn_qlb__entry__3 "><p class="p">文件解密流</p></td> <td class="entry" headers="Java_SDK___table_btm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(24)getImageView(图片格式转换)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">客户端解密是指用户从OBS服务器获取密文后,在客户端进行数据解密。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_ctm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ctm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_ctm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_ctm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_ctm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_ctm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__1 "> <p class="p">mode</p> </td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__2 "> <p class="p">String</p> </td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__3 "> <p class="p">true</p> </td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__4 "> <p class="p">缩放方式,有效值 0~5。 </p> <ul class="ul" id="Java_SDK___ul_rcs_xb4_qlb"> <li class="li"><strong class="ph b">0</strong>:限定缩略图的长边最多为 ,短边最多为 ,进行等比缩放,不裁剪。如果只指定 w 参数则表示限定长边(短边自适应),只指定 h 参数则表示限定短边(长边自适应)。</li> <li class="li"><strong class="ph b">1</strong>:限定缩略图的宽最少为 ,高最少为 ,进行等比缩放,居中裁剪。转后的缩略图通常恰好是 x 的大小(有一个边缩放的时候会因为超出矩形框而被裁剪掉多余部分)。如果只指定 w 参数或只指定 h 参数,代表限定为长宽相等的正方图。</li> <li class="li"> <p class="p"><strong class="ph b">2</strong>: 限定缩略图的宽最多为 ,高最多为 ,进行等比缩放,不裁剪。如果只指定 w 参数则表示限定宽(长自适应),只指定 h 参数则表示限定长(宽自适应)。它和模式0类似,区别只是限定宽和高,不是限定长边和短边。从应用场景来说,模式0适合移动设备上做缩略图,模式2适合PC上做缩略图。</p> </li> <li class="li"> <p class="p"><strong class="ph b">3</strong>: 限定缩略图的宽最少为 ,高最少为 ,进行等比缩放,不裁剪。如果只指定 w 参数或只指定 h 参数,代表长宽限定为同样的值。你可以理解为模式1是模式3的结果再做居中裁剪得到的。</p> </li> <li class="li"> <p class="p"><strong class="ph b">4</strong>:限定缩略图的长边最少为 ,短边最少为 ,进行等比缩放,不裁剪。如果只指定 w 参数或只指定 h 参数,表示长边短边限定为同样的值。这个模式很适合在手持设备做图片的全屏查看(把这里的长边短边分别设为手机屏幕的分辨率即可),生成的图片尺寸刚好充满整个屏幕(某一个边可能会超出屏幕)。</p> </li> <li class="li"> <p class="p"><strong class="ph b">5</strong>: 限定缩略图的长边最少为 ,短边最少为 ,进行等比缩放,居中裁剪。如果只指定 w 参数或只指定 h 参数,表示长边短边限定为同样的值。同上模式4,但超出限定的矩形部分会被裁剪。 `width:` 图片宽度,非负数,有效值(0-6000)</p> <p class="p">height:图片高度,非负数,有效值(0-6000)</p> <p class="p">imageFormat: 图片格式(非必传),支持jpeg, tiff, gif, bmp, png</p> </li> </ul> </td> <td class="entry" headers="Java_SDK___table_ctm_dbn_qlb__entry__5 "> <p class="p">-</p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_dtm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_dtm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_dtm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_dtm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_dtm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_dtm_dbn_qlb__entry__1 "><p class="p">s3object</p></td> <td class="entry" headers="Java_SDK___table_dtm_dbn_qlb__entry__2 "><p class="p">S3Object</p></td> <td class="entry" headers="Java_SDK___table_dtm_dbn_qlb__entry__3 "><p class="p">包含对象流的 S3Object 实例,需读取 Content 自行保存</p></td> <td class="entry" headers="Java_SDK___table_dtm_dbn_qlb__entry__4 "><p class="p">- </p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(25)getThumbnail (获取缩略图或视频截图)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">根据自定义规则获取缩略图或视频截图,缩略图支持格式jpeg, tiff, gif, bmp, png,截图支持格式:` jpg和png,此法将占用一个Http连接,在Content读取完毕或显示关闭时释放连接。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_etm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_etm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_etm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_etm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_etm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_etm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__1 "><p class="p">formatName</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__4 "><p class="p">适配规则名称: 作为条件从数据库获取对应的自定义规则,然后截取第一个/前的内容进行适配,若为imageView则是图片缩放,若为vframe,则是视频截图 </p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__1 "><p class="p">rectify</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__4 "><p class="p">是否需要校正`(“true”或”false”,非必传),只对视频截图进行校正,旋转90或270(只是宽和高的长度换,并不是真正的旋转)</p></td> <td class="entry" headers="Java_SDK___table_etm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_ftm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ftm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_ftm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_ftm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_ftm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ftm_dbn_qlb__entry__1 "><p class="p">s3object</p></td> <td class="entry" headers="Java_SDK___table_ftm_dbn_qlb__entry__2 "><p class="p">S3Object</p></td> <td class="entry" headers="Java_SDK___table_ftm_dbn_qlb__entry__3 "><p class="p">包含对象流的 S3Object 实例,需读取 Content 自行保存</p></td> <td class="entry" headers="Java_SDK___table_ftm_dbn_qlb__entry__4 "><p class="p">- </p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(26)getCutImage (图片剪切)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">根据宽度和高度获取剪切图,先截取图片左边和上边,截取到一定大小后(比较小的时候),会截取四边,保留中间部分,当设定值大于图片实际宽、高时,会根据实际大小裁剪,支持 jpeg, tiff, gif, bmp, emf, exif, wmf, icon, png, memoryBmp, webp。此方法将占用一个 Http 连接,在 Content 读取完毕或显示关闭时释放连接。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_gtm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_gtm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_gtm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_gtm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_gtm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_gtm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__1 "><p class="p">width</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__2 "><p class="p">int</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__4 "><p class="p">图片宽度,非负数,有效值(0-6000)</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__1 "><p class="p">height</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__2 "><p class="p">int</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__4 "><p class="p">图片高度,非负数,有效值(0-6000)</p></td> <td class="entry" headers="Java_SDK___table_gtm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_htm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_htm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_htm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_htm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_htm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_htm_dbn_qlb__entry__1 "><p class="p">s3object</p></td> <td class="entry" headers="Java_SDK___table_htm_dbn_qlb__entry__2 "><p class="p">S3Object</p></td> <td class="entry" headers="Java_SDK___table_htm_dbn_qlb__entry__3 "><p class="p">包含对象流的 S3Object 实例,需读取 Content 自行保存</p></td> <td class="entry" headers="Java_SDK___table_htm_dbn_qlb__entry__4 "><p class="p"> -</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(27)getImageInfo(获取图片信息)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">获取指定图片信息。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_itm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_itm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_itm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_itm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_itm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_itm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_itm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_itm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_itm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_itm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_itm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_itm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_itm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_itm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_itm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_itm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_jtm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_jtm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_jtm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_jtm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_jtm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_jtm_dbn_qlb__entry__1 "><p class="p">imageInfoStr</p></td> <td class="entry" headers="Java_SDK___table_jtm_dbn_qlb__entry__2 "><p class="p">InputStream</p></td> <td class="entry" headers="Java_SDK___table_jtm_dbn_qlb__entry__3 "> <p class="p">图片信息,<strong class="ph b">json</strong>格式字符串,示例如下:</p> <pre class="pre codeblock"><code>{"ColorModel": "rgb", //颜色模式 &nbsp; "Format": "jpeg", //图片格式 &nbsp; "FrameNumber": 0, //缩放方式,与 mode 一样 &nbsp; "Height": 1707, &nbsp; "Width": 963 }</code></pre></td> <td class="entry" headers="Java_SDK___table_jtm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(28)transCodingMedia(媒体转码)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">媒体转码,此方法将占用一个 Http 连接,在 Content 读取完毕或显示关闭时释放连接。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_ktm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ktm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_ktm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_ktm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_ktm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_ktm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__1 "><p class="p">format</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__4 "><p class="p">转码后对象的格式</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__1 "><p class="p">notifyURL</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__4 "><p class="p">转码JOB的通知URL</p></td> <td class="entry" headers="Java_SDK___table_ktm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_ltm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ltm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_ltm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_ltm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_ltm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ltm_dbn_qlb__entry__1 "><p class="p">s3object</p></td> <td class="entry" headers="Java_SDK___table_ltm_dbn_qlb__entry__2 "><p class="p">S3Object</p></td> <td class="entry" headers="Java_SDK___table_ltm_dbn_qlb__entry__3 "><p class="p">包含对象流的 S3Object 实例,需读取 Content 自行保存</p></td> <td class="entry" headers="Java_SDK___table_ltm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(29)getVedioFrame(视频截图)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">获取视频截图,此方法将占用一个 Http 连接,在 Content 读取完毕或显示关闭时释放连接。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_mtm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_mtm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_mtm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_mtm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_mtm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_mtm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__1 "><p class="p">format</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__4 "><p class="p">截图的格式、尺寸</p></td> <td class="entry" headers="Java_SDK___table_mtm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_ntm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ntm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_ntm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_ntm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_ntm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ntm_dbn_qlb__entry__1 "><p class="p">s3object</p></td> <td class="entry" headers="Java_SDK___table_ntm_dbn_qlb__entry__2 "><p class="p">S3Object</p></td> <td class="entry" headers="Java_SDK___table_ntm_dbn_qlb__entry__3 "><p class="p">包含对象流的 S3Object 实例,需读取 Content 自行保存</p></td> <td class="entry" headers="Java_SDK___table_ntm_dbn_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(30)getMediaInfo(获取媒体信息)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">获取视频截图,此方法将占用一个 Http 连接,在 Content 读取完毕或显示关闭时释放连接。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_otm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_otm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_otm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_otm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_otm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_otm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_otm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_otm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_otm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_otm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_otm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_otm_dbn_qlb__entry__1 "><p class="p">objectKey</p></td> <td class="entry" headers="Java_SDK___table_otm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_otm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_otm_dbn_qlb__entry__4 "><p class="p">对象 Key</p></td> <td class="entry" headers="Java_SDK___table_otm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_ptm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ptm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_ptm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_ptm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_ptm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ptm_dbn_qlb__entry__1 "><p class="p">mediaInfoStr</p></td> <td class="entry" headers="Java_SDK___table_ptm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_ptm_dbn_qlb__entry__3 "> <p class="p">媒体对象的信息,<strong class="ph b">json</strong>格式字符串,示例如下:</p> <pre class="pre codeblock"><code>{ "streams": [{ "index": 0, "codec_name": "mjpeg", "codec_long_name": "MJPEG (Motion JPEG)", "codec_type": "video", "codec_time_base": "1/25", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "width": 3885, "height": 2764, "has_b_frames": 0, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "3885:2764", "pix_fmt": "yuvj444p", "level": -99, "color_range": "pc", "color_space": "bt470bg", "chroma_location": "center", "refs": 1, "r_frame_rate": "25/1", "avg_frame_rate": "0/0", "time_base": "1/25", "bits_per_raw_sample": "8", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0 } }], "format": { "filename": "/wls/appsystems/csp-media/data/0b5f036604ea452fbc26810946293644xiaoming-bucket-0009.46a5476297c740239820ed4d64e256a6$002", "nb_streams": 1, "nb_programs": 0, "format_name": "jpeg_pipe", "format_long_name": "piped jpeg sequence", "size": "1659948", "probe_score": 6 } }</code></pre></td> <td class="entry" headers="Java_SDK___table_ptm_dbn_qlb__entry__4 "><p class="p">- </p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(31)queryMediaByCKs(获取转码记录)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">获取 media 转码记录,用于查询转码进度<strong class="ph b">。</strong></p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_qtm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_qtm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_qtm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_qtm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_qtm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_qtm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_qtm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_qtm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_qtm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_qtm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_qtm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_qtm_dbn_qlb__entry__1 "><p class="p">convertedKeys</p></td> <td class="entry" headers="Java_SDK___table_qtm_dbn_qlb__entry__2 "><p class="p">List<String></p></td> <td class="entry" headers="Java_SDK___table_qtm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_qtm_dbn_qlb__entry__4 "><p class="p">转换后新生成的对象Key集合</p></td> <td class="entry" headers="Java_SDK___table_qtm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_rtm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_rtm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_rtm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_rtm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_rtm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_rtm_dbn_qlb__entry__1 "><p class="p">mediaResultStr</p></td> <td class="entry" headers="Java_SDK___table_rtm_dbn_qlb__entry__2 "><p class="p">String </p></td> <td class="entry" headers="Java_SDK___table_rtm_dbn_qlb__entry__3 "> <p class="p">音视频转码进度信息,json字符串,示例如下:</p> <pre class="pre codeblock"><code>[{ "bucket": "yourBucket", "finishTime": "2017-07-14 13:56:54", "submitTime": "2017-07-14 13:56:53", "startTime": "2017-07-14 13:56:53", "state": "Error", // 状态,用于反应转码进度 "oriObjectKey": "46a5476297c740239820ed4d64e256a6$002", // 原始key "message": "desFile.exists: false", // 失败原因 "convertedKey": "yourConvertedKey " }]</code></pre></td> <td class="entry" headers="Java_SDK___table_rtm_dbn_qlb__entry__4 "><p class="p">- </p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(32)deleteMediaByCK(删除转码信息)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">根据转换后新生成的 key 删除 media 转码记录及转码后的 object。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_stm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_stm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_stm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_stm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_stm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_stm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_stm_dbn_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="Java_SDK___table_stm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_stm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_stm_dbn_qlb__entry__4 "><p class="p">保存对象的 bucket 名称</p></td> <td class="entry" headers="Java_SDK___table_stm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_stm_dbn_qlb__entry__1 "><p class="p">convertedKey</p></td> <td class="entry" headers="Java_SDK___table_stm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_stm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_stm_dbn_qlb__entry__4 "><p class="p">转换后新生成的对象 Key</p></td> <td class="entry" headers="Java_SDK___table_stm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <p class="p">无</p> <p class="p"><strong class="ph b">(33)pfop(图片处理,音视频转码持久化处理(PFOP接口))</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">图片、音视频异步处理并持久化。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_utm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_utm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_utm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_utm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_utm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_utm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__1 "><p class="p">sourceType</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__2 "><p class="p">SourceType</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__4 "><p class="p">媒体类型</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__1 "><p class="p">srcBucket</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__4 "><p class="p">源bucket</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__1 "><p class="p">srcKey</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__4 "><p class="p">源key</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__1 "><p class="p">force</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__2 "><p class="p">boolean</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__4 "><p class="p">指定当处理后的KEY已经存在于bucket中是否覆盖已经存在的对象。为true时覆盖。</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__1 "><p class="p">notifyUrl</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__4 "><p class="p">异步处理完成后通知客户的地址。</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__1 "><p class="p">ops</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__4 "> <p class="p">持久处理操作列表,用 | 分隔,如:</p> <pre class="pre codeblock"><code>avthumb/wma; saveas/ZGRhc2U6cGxhaW50ZXh0LWZyYW1lLTFa|avthumb/mp3;</code></pre> <p class="p"> saveas/ZGRhc2U6cGxhaW50ZXh0LWZyYW1lMVU= 是将源视频文件转成wma并以KEY mywma 存储在bucket ddase下;转成mp3并以KEY mymp3 存储在bucket ddase下。 </p> <p class="p">一个持久处理包括处理命令和存储设置,用 ; 分隔。存储设置以saveas/开头,后接按Base64编码后的字符串。若不指定saveas,则会由obs生成一个key并保存在srcBucket下。 </p> </td> <td class="entry" headers="Java_SDK___table_utm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_vtm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_vtm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_vtm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_vtm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_vtm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_vtm_dbn_qlb__entry__1 "><p class="p">resultStr</p></td> <td class="entry" headers="Java_SDK___table_vtm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_vtm_dbn_qlb__entry__3 "> <p class="p">Pfop异步操作流水号JSON,用于查询操作进度。</p> <pre class="pre codeblock"><code>{"persistentId": "0443351fbb564de38542f8c092d18389fe9f8345f3ca"}</code></pre> </td> <td class="entry" headers="Java_SDK___table_vtm_dbn_qlb__entry__4 "><p class="p">- </p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(34)Prefop(PFOP持久化处理结果查询)</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">操作pfop操作进度和操作结果。</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="Java_SDK___table_wtm_dbn_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_wtm_dbn_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="Java_SDK___table_wtm_dbn_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="Java_SDK___table_wtm_dbn_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="Java_SDK___table_wtm_dbn_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="Java_SDK___table_wtm_dbn_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_wtm_dbn_qlb__entry__1 "><p class="p">persistentId</p></td> <td class="entry" headers="Java_SDK___table_wtm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_wtm_dbn_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="Java_SDK___table_wtm_dbn_qlb__entry__4 "><p class="p">异步处理流水号</p></td> <td class="entry" headers="Java_SDK___table_wtm_dbn_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="Java_SDK___table_xtm_dbn_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_xtm_dbn_qlb__entry__1"><p class="p">字段名称</p></th> <th class="entry" id="Java_SDK___table_xtm_dbn_qlb__entry__2"><p class="p">字段类型</p></th> <th class="entry" id="Java_SDK___table_xtm_dbn_qlb__entry__3"><p class="p">字段描述</p></th> <th class="entry" id="Java_SDK___table_xtm_dbn_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_xtm_dbn_qlb__entry__1 "><p class="p">resultStr</p></td> <td class="entry" headers="Java_SDK___table_xtm_dbn_qlb__entry__2 "><p class="p">String</p></td> <td class="entry" headers="Java_SDK___table_xtm_dbn_qlb__entry__3 "> <p class="p">查询响应为content-type为application/json的字符串,示例如下:</p> <pre class="pre codeblock"><code>{ "id":"0f7edf1e508e4620b8784e5ca4dd7554fe9f82ff1b31", "notifyState":"0", "desc":"The fop was completed successfully", "notifyTryTimes":4, "items":[{ "cmd":"convert/900/600/png/75", "desc":"success", "error":"", "hash":"\"b2e18e821063c7713e497dd0c9a6a7e3\"", "code":0, "key":"ZGRhc2U6ZGRhc2VhYzRlZjIyOGQxNDQ0MDRiYmM5ZDYyNzE2ZWU5M2ZhNjA="}, {"cmd":"thumb/0/700/800/png/75", "desc":"success", "error":"", "hash":"\"ab63afa8d90fc944ed437d91d8d10b81\"", "code":0, "key":"ZGRhc2U6ZGRhc2U2YjIyOGQ0MWZjZmQ0NTllOGQ2OTRkYTgzNDJmYjkyYzA="}, {"cmd":"imageslim", "desc":"success", "error":"", "hash":"\"4e3cd2637001ce77d95928a0e961548f\"", "code":0, "key":"ZGRhc2U6ZGRhc2U0MTcwZWQ0NDc4NzU0NzNkYjUwM2Q5NzU2OTUxN2Y5NTA=" }], "inputKey":"1222_1-test", "inputBucket":"ddase", "code":0, "notifyResponseCode":200 }</code></pre></td> <td class="entry" headers="Java_SDK___table_xtm_dbn_qlb__entry__4 "><p class="p">- </p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">查询结果说明:</strong></p> <table class="table" id="Java_SDK___table_ytm_dbn_qlb"><caption></caption><colgroup><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_ytm_dbn_qlb__entry__1"><p class="p">名称</p></th> <th class="entry" id="Java_SDK___table_ytm_dbn_qlb__entry__2"><p class="p">必填</p></th> <th class="entry" id="Java_SDK___table_ytm_dbn_qlb__entry__3"><p class="p">描述</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__1 "><p class="p">code</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__2 "><p class="p">是</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__3 "><p class="p">状态码 0:成功,1:正在处理,2:处理成功但PFOP操作列表部分或全部失败,3:处理失败</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__1 "><p class="p">desc</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__2 "><p class="p">否</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__3 "><p class="p">对应code的描述</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__1 "><p class="p">id</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__2 "><p class="p">是</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__3 "><p class="p">PFOP持久处理流水号</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__1 "><p class="p">inputBucket</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__2 "><p class="p">是</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__3 "><p class="p">源文件所在bucket</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__1 "><p class="p">inputKey</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__2 "><p class="p">是</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__3 "><p class="p">源文件所在key</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__1 "><p class="p">items</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__2 "><p class="p">否</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__3 "><p class="p">持久操作列表(仅当code码为0/2时该字段有值),与通知内容中的items一致,请参阅 通知内容说明</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__1 "><p class="p">notifyState</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__2 "><p class="p">否</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__3 "><p class="p">通知状态 0:成功,1:等待通知,2:通知失败,3:通知彻底失败并不再尝试通知。为空表示处理还未完成。</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__1 "><p class="p">notifyResponseCode</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__2 "><p class="p">否</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__3 "><p class="p">通知客户端的响应码,当响应为200时被认为通知成功</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__1 "><p class="p">notifyResponseBody</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__2 "><p class="p">否</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__3 "><p class="p">通知响应,当通知失败时为失败相关的信息</p></td> </tr> <tr class="row"> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__1 "><p class="p">notifyTryTimes</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__2 "><p class="p">否</p></td> <td class="entry" headers="Java_SDK___table_ytm_dbn_qlb__entry__3 "><p class="p">通知客户端已经尝试的次数</p></td> </tr> </tbody></table> </section> <section class="section" id="Java_SDK___section_xhz_xvb_4mb"><h2 class="doc-tairway">常用实现场景</h2> <p class="p"><strong class="ph b">场景描述</strong></p> <p class="p">平安云ECS主机上传,生成公网可访问的下载链接。</p> <p class="p"><strong class="ph b">实现过程</strong></p> <p class="p">初始化上传service</p> <pre xmlns:version="java:net.sf.saxon.Version" class="pre codeblock language-java">RadosgwService uploadService = RadosgwServiceFactory.getFromConfigFile(<span class="hl-string" style="color:#2a00ff">"obs_ecs_upload.properties"</span>);</pre> <p class="p">初始化生成公网链接service</p> <pre xmlns:version="java:net.sf.saxon.Version" class="pre codeblock language-java">RadosgwService urlService=RadosgwServiceFactory.getFromConfigFile(<span class="hl-string" style="color:#2a00ff">"obs_ext_url.properties"</span>);</pre> <p class="p">调用上传服务</p> <pre xmlns:version="java:net.sf.saxon.Version" class="pre codeblock language-java">uploadService.putObject(<span class="hl-string" style="color:#2a00ff">"bucket"</span>, <span class="hl-string" style="color:#2a00ff">"objectKey"</span>, <strong class="hl-keyword" style="color:#7f0055">new</strong> File(<span class="hl-string" style="color:#2a00ff">"filePath"</span>));</pre> <p class="p">生成公网下载链接</p> <pre xmlns:version="java:net.sf.saxon.Version" class="pre codeblock language-java">String url=urlService.getSignedUrl(<span class="hl-string" style="color:#2a00ff">"bucket"</span>, <span class="hl-string" style="color:#2a00ff">"objectKey"</span>);</pre> <p class="p">配置文件信息</p> <table class="table" id="Java_SDK___table_wgd_jwb_4mb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="Java_SDK___table_wgd_jwb_4mb__entry__1">obs_ecs_upload.properties</th> <th class="entry" id="Java_SDK___table_wgd_jwb_4mb__entry__2">obs_ext_url.properties</th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="Java_SDK___table_wgd_jwb_4mb__entry__1 "> <p class="p">access_id= Access Key ID which have upload rights</p> <p class="p">security_id=Access Key Secret which have upload rights</p> <p class="p">rgw_addr=obs-cn-shenzhen-internal.cloud.papub</p> </td> <td class="entry" headers="Java_SDK___table_wgd_jwb_4mb__entry__2 "> <p class="p">access_id= Access Key ID which have download rights</p> <p class="p">security_id=Access Key Secret which have download rights</p> <p class="p">rgw_addr=obs-cn-shenzhen.pinganyun.com</p> </td> </tr> </tbody></table> </section>
以上内容是否解决了您的问题?
请补全提交信息!
咨询·建议

电话咨询

400-151-8800

邮件咨询

cloud@pingan.com

在线客服

工单支持

解决云产品相关技术问题