On this web page, it is claimed that we can "Begin an upload before you know the final object size - You can upload an object as you are creating it."
But I did not find any example to do it. I have an input stream that I want to parse and then write results of the parsing in an output stream towards S3. I would like to avoid storing chunks of results on disk to upload classically in S3. I want to start writing in S3 as soon as I start receiving the input stream. I don't know by advance the size of the output stream I am going to write and it may be big > 100 GB. I found this method. But it is clearly highlighted that the content length must be specified. Otherwise AWS SDK will try to put everything in memory before sending it to S3.
I am using AWS SDK 1.9.40 (Gradle dependency : compile "com.amazonaws:aws-java-sdk:1.9.40"
).