问题描述
TransferManager类已从AWS sdk Java 2.x中删除.可以使用TransferManager替代什么,以及如何使用
TransferManager class has been removed from AWS sdk Java 2.x. What is the alternative for TransferManager and how it can be used
推荐答案
TransferManager未被删除,它尚未在Java 2.X中实现.您可以看到用于实现在其github上的TransferManager .它目前正在开发中,似乎没有完成该任务的时间表.
TransferManager wasn't removed, it was just not implemented in Java 2.X yet. You can see the project to implement TransferManager on their github. It is currently in development and there does not appear to be a timeline of when this will be completed.
您可以使用 S3Client.putObject方法将对象转移到S3存储桶中,或者如果您真的必须使用TransferManager才能包含AWS S3 SDK版本1.X,并将TransferManager与AWS S3 SDK 2.X一起使用.
You can use the S3Client.putObject method to transfer an object over to your S3 bucket, or if you really must use TransferManager you can include the AWS S3 SDK version 1.X and use TransferManager along with AWS S3 SDK 2.X.
示例:
S3Client s3 = S3Client.builder ().credentialsProvider (/*Your credentials*/).build ();
s3.putObject (/*param1*/, /*param2*/)
这篇关于AWS开发工具包Java 2.x中TransferManager的替代产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!