In S3 library ResponseInputStream<?>
doesn't seem to support the InputSteam
int read(byte[] buffer)
method correctly
#5381
Labels
Describe the bug
When requesting the
ResponseInputStream<GetObjectRequest>
object with then callingread(bytes)
with a defined byte too few bytes are read into the array. Comparing the SDKs side-by-side shows that the V1 SDK loads the full size of the byte array whereas the new SDK only loads a subset.Expected Behavior
I expect the 2 SDKs to work the same i.e.
S3Object.getObjectContent()
to behave the same as the new response type.Current Behavior
Using the code below I get a smaller amount of bytes returned than requested (see this in the context of the small program I've submitted)
If I supply
inputStream.read(bytes, 0, bytes.length);
It works perfectly in old and new
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
s3:2.25.11
JDK version used
openjdk version "21.0.2" 2024-01-16 LTS
Operating System and version
macOS 14.5 (23F79)
The text was updated successfully, but these errors were encountered: