How to read a s3 file for all versions

白昼怎懂夜的黑 提交于 2020-03-28 06:39:12

问题


Say, I have a s3 bucket with name "fruits" inside that there is a s3key "apples/55.txt" with 50 revisions. When you read the file using S3Object in Java it prints the contents of lastest revision only.

But, I want to read the file content of current and all previous versions. How to do this ?

Is it like first get all the revision number, read the file using revision number add them to a List and print ??

BufferedReader Bufferread = new BufferedReader(new InputStreamReader(object.getObjectContent()));
System.out.println(s3Client.getObjectMetadata("fruits","apples/55.txt"));

来源:https://stackoverflow.com/questions/60563179/how-to-read-a-s3-file-for-all-versions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!