[英]How would I write a String directly to S3 in Java?
有没有一种方法可以直接将String
写入S3,而无需首先将其写入文件?
It will end up in a "file", because S3 is a directory structure. 由于S3是目录结构,因此它将以“文件”结尾。 But you can write it via a string/stream/reader, if your api allows it. 但是,如果您的api允许,您可以通过字符串/流/阅读器来编写它。
For example, the jets3t API has this (s3Key is the key it is stored under in s3. Filename, in other words) 例如, jets3t API具有此功能(s3Key是它存储在s3中的密钥。换句话说,文件名)
s3service.putObject(bucketName, new S3Object(s3Key, yourString));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.