I am uploading files to Amazon S3 bucket. The files are being uploaded but i get the following Warning.
WARNING: No content length specified for stream data. Stream contents will be buffered in memory and could result in out of memory errors.
So I added the following line to my code
metaData.setContentLength(IOUtils.toByteArray(input).length);
but then i got the following message. I don't even know if it is a warning or what.
Data read has a different length than the expected: dataLength=0; expectedLength=111992; includeSkipped=false; in.getClass()=class sun.net.httpserver.FixedLengthInputStream; markedSupported=false; marked=0; resetSinceLastMarked=false; markCount=0; resetCount=0
How can i set contentLength to the metaData of InputSteam? Any help would be greatly appreciated.