热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

software.amazon.awssdk.core.async.AsyncRequestBody.fromFile()方法的使用及代码示例

本文整理了Java中software.amazon.awssdk.core.async.AsyncRequestBody.fromFile()方法的一些代码示例,展示了

本文整理了Java中software.amazon.awssdk.core.async.AsyncRequestBody.fromFile()方法的一些代码示例,展示了AsyncRequestBody.fromFile()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncRequestBody.fromFile()方法的具体详情如下:
包路径:software.amazon.awssdk.core.async.AsyncRequestBody
类名称:AsyncRequestBody
方法名:fromFile

AsyncRequestBody.fromFile介绍

[英]Creates an AsyncRequestBody that produces data from the contents of a file. See FileAsyncRequestBody#builder to create a customized body implementation.
[中]

代码示例

代码示例来源:origin: aws/aws-sdk-java-v2

/**
* Invokes the StreamingInputOperation operation asynchronously.
*
* @param streamingInputOperationRequest
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
* multiple times in the event of a retry. If the file does not exist or the current user does not have
* access to read it then an exception will be thrown. The service documentation for the request content is
* as follows ''
* @return A Java Future containing the result of the StreamingInputOperation operation returned by the service.

* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*


    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
    * Can be used for catch all scenarios.

  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get
    * credentials, etc.

  • *
  • ProtocolRestJsonException Base class for all service exceptions. Unknown exceptions will be thrown as
    * an instance of this type.

  • *

* @sample ProtocolRestJsonAsyncClient.StreamingInputOperation
* @see * target="_top">AWS API Documentation
*/
default CompletableFuture streamingInputOperation(
StreamingInputOperationRequest streamingInputOperationRequest, Path sourcePath) {
return streamingInputOperation(streamingInputOperationRequest, AsyncRequestBody.fromFile(sourcePath));
}

代码示例来源:origin: aws/aws-sdk-java-v2

/**
* Invokes the StreamingInputOperation operation asynchronously.
*
* @param streamingInputOperationRequest
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
* multiple times in the event of a retry. If the file does not exist or the current user does not have
* access to read it then an exception will be thrown. The service documentation for the request content is
* as follows ''
* @return A Java Future containing the result of the StreamingInputOperation operation returned by the service.

* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*


    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
    * Can be used for catch all scenarios.

  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get
    * credentials, etc.

  • *
  • ProtocolRestJsonException Base class for all service exceptions. Unknown exceptions will be thrown as
    * an instance of this type.

  • *

* @sample ProtocolRestJsonAsyncClient.StreamingInputOperation
* @see * target="_top">AWS API Documentation
*/
default CompletableFuture streamingInputOperation(
StreamingInputOperationRequest streamingInputOperationRequest, Path sourcePath) {
return streamingInputOperation(streamingInputOperationRequest, AsyncRequestBody.fromFile(sourcePath));
}

代码示例来源:origin: aws/aws-sdk-java-v2

/**
* Invokes the StreamingInputOperation operation asynchronously.
*
* @param streamingInputOperationRequest
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
* multiple times in the event of a retry. If the file does not exist or the current user does not have
* access to read it then an exception will be thrown. The service documentation for the request content is
* as follows ''
* @return A Java Future containing the result of the StreamingInputOperation operation returned by the service.

* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*


    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
    * Can be used for catch all scenarios.

  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get
    * credentials, etc.

  • *
  • CodeGenerationJsonRpcCustomizedException Base class for all service exceptions. Unknown exceptions
    * will be thrown as an instance of this type.

  • *

* @sample CodeGenerationJsonRpcCustomizedAsyncClient.StreamingInputOperation
*/
default CompletableFuture streamingInputOperation(
StreamingInputOperationRequest streamingInputOperationRequest, Path sourcePath) {
return streamingInputOperation(streamingInputOperationRequest, AsyncRequestBody.fromFile(sourcePath));
}

代码示例来源:origin: aws/aws-sdk-java-v2

return putObject(putObjectRequest, AsyncRequestBody.fromFile(sourcePath));

代码示例来源:origin: software.amazon.awssdk/mediastoredata

return putObject(putObjectRequest, AsyncRequestBody.fromFile(sourcePath));

代码示例来源:origin: aws/aws-sdk-java-v2

return uploadPart(uploadPartRequest, AsyncRequestBody.fromFile(sourcePath));

代码示例来源:origin: aws/aws-sdk-java-v2

return putObject(putObjectRequest, AsyncRequestBody.fromFile(sourcePath));

代码示例来源:origin: aws/aws-sdk-java-v2

return uploadDocuments(uploadDocumentsRequest, AsyncRequestBody.fromFile(sourcePath));

代码示例来源:origin: aws/aws-sdk-java-v2

return uploadArchive(uploadArchiveRequest, AsyncRequestBody.fromFile(sourcePath));

代码示例来源:origin: software.amazon.awssdk/glacier

return uploadArchive(uploadArchiveRequest, AsyncRequestBody.fromFile(sourcePath));

代码示例来源:origin: software.amazon.awssdk/glacier

return uploadMultipartPart(uploadMultipartPartRequest, AsyncRequestBody.fromFile(sourcePath));

代码示例来源:origin: aws/aws-sdk-java-v2

return uploadMultipartPart(uploadMultipartPartRequest, AsyncRequestBody.fromFile(sourcePath));

代码示例来源:origin: aws/aws-sdk-java-v2

return postContent(postContentRequest, AsyncRequestBody.fromFile(sourcePath),
AsyncResponseTransformer.toFile(destinationPath));

代码示例来源:origin: software.amazon.awssdk/lexruntime

return postContent(postContentRequest, AsyncRequestBody.fromFile(sourcePath),
AsyncResponseTransformer.toFile(destinationPath));

推荐阅读
  • 个人学习使用:谨慎参考1Client类importcom.thoughtworks.gauge.Step;importcom.thoughtworks.gauge.T ... [详细]
  • 本文介绍了解决Netty拆包粘包问题的一种方法——使用特殊结束符。在通讯过程中,客户端和服务器协商定义一个特殊的分隔符号,只要没有发送分隔符号,就代表一条数据没有结束。文章还提供了服务端的示例代码。 ... [详细]
  • 解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法
    本文介绍了解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法,包括检查location配置是否正确、pass_proxy是否需要加“/”等。同时,还介绍了修改nginx的error.log日志级别为debug,以便查看详细日志信息。 ... [详细]
  • 开源Keras Faster RCNN模型介绍及代码结构解析
    本文介绍了开源Keras Faster RCNN模型的环境需求和代码结构,包括FasterRCNN源码解析、RPN与classifier定义、data_generators.py文件的功能以及损失计算。同时提供了该模型的开源地址和安装所需的库。 ... [详细]
  • 本文整理了Java中java.lang.NoSuchMethodError.getMessage()方法的一些代码示例,展示了NoSuchMethodErr ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • 本文介绍了一个题目的解法,通过二分答案来解决问题,但困难在于如何进行检查。文章提供了一种逃逸方式,通过移动最慢的宿管来锁门时跑到更居中的位置,从而使所有合格的寝室都居中。文章还提到可以分开判断两边的情况,并使用前缀和的方式来求出在任意时刻能够到达宿管即将锁门的寝室的人数。最后,文章提到可以改成O(n)的直接枚举来解决问题。 ... [详细]
  • 3.223.28周学习总结中的贪心作业收获及困惑
    本文是对3.223.28周学习总结中的贪心作业进行总结,作者在解题过程中参考了他人的代码,但前提是要先理解题目并有解题思路。作者分享了自己在贪心作业中的收获,同时提到了一道让他困惑的题目,即input details部分引发的疑惑。 ... [详细]
  • 本文介绍了在iOS开发中使用UITextField实现字符限制的方法,包括利用代理方法和使用BNTextField-Limit库的实现策略。通过这些方法,开发者可以方便地限制UITextField的字符个数和输入规则。 ... [详细]
  • Netty源代码分析服务器端启动ServerBootstrap初始化
    本文主要分析了Netty源代码中服务器端启动的过程,包括ServerBootstrap的初始化和相关参数的设置。通过分析NioEventLoopGroup、NioServerSocketChannel、ChannelOption.SO_BACKLOG等关键组件和选项的作用,深入理解Netty服务器端的启动过程。同时,还介绍了LoggingHandler的作用和使用方法,帮助读者更好地理解Netty源代码。 ... [详细]
  • 本文介绍了在Cpp中将字符串形式的数值转换为int或float等数值类型的方法,主要使用了strtol、strtod和strtoul函数。这些函数可以将以null结尾的字符串转换为long int、double或unsigned long类型的数值,且支持任意进制的字符串转换。相比之下,atoi函数只能转换十进制数值且没有错误返回。 ... [详细]
  • 本文整理了Java中org.gwtbootstrap3.client.ui.Icon.addDomHandler()方法的一些代码示例,展示了Icon.ad ... [详细]
  • 本文整理了Java中org.apache.pig.backend.executionengine.ExecException.<init>()方法的一些代码 ... [详细]
  • vb.net面试题,请大家帮忙,谢谢。如果需要讲详细一点,那就加我QQ531412815第4题,潜在的错误,这里的错误不是常规错误,属于那种只有在运行是才知道的错误:Catchex ... [详细]
author-avatar
wrennlatsha_188
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有