Skip to content

Commit fd1aa31

Browse files
committed
use isLastPart in arq
1 parent d412709 commit fd1aa31

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/software/amazon/encryption/s3/internal/CipherAsyncRequestBody.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ public class CipherAsyncRequestBody implements AsyncRequestBody {
2020
private final Long ciphertextLength;
2121
private final CryptographicMaterials materials;
2222
private final byte[] iv;
23+
private final boolean isLastPart;
2324

2425
public CipherAsyncRequestBody(final AsyncRequestBody wrappedAsyncRequestBody, final Long ciphertextLength, final CryptographicMaterials materials, final byte[] iv, final boolean isLastPart) {
2526
this.wrappedAsyncRequestBody = wrappedAsyncRequestBody;
2627
this.ciphertextLength = ciphertextLength;
2728
this.materials = materials;
2829
this.iv = iv;
30+
this.isLastPart = isLastPart;
2931
}
3032

3133
public CipherAsyncRequestBody(final AsyncRequestBody wrappedAsyncRequestBody, final Long ciphertextLength, final CryptographicMaterials materials, final byte[] iv) {
@@ -38,7 +40,7 @@ public CipherAsyncRequestBody(final AsyncRequestBody wrappedAsyncRequestBody, fi
3840
public void subscribe(Subscriber<? super ByteBuffer> subscriber) {
3941
wrappedAsyncRequestBody.subscribe(new CipherSubscriber(subscriber,
4042
contentLength().orElseThrow(() -> new S3EncryptionClientException("Unbounded streams are currently not supported.")),
41-
materials, iv));
43+
materials, iv, isLastPart));
4244
}
4345

4446
@Override

0 commit comments

Comments
 (0)