Class MultipartUploadMaterials
- java.lang.Object
- 
- software.amazon.encryption.s3.internal.MultipartUploadMaterials
 
- 
- All Implemented Interfaces:
- CryptographicMaterials
 
 public class MultipartUploadMaterials extends Object implements CryptographicMaterials 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMultipartUploadMaterials.Builder
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AlgorithmSuitealgorithmSuite()protected voidbeginPartUpload(int nextPartNumber, long partContentLength)Can be used to check the next part number must either be the same (if it was a retry) or increment by exactly 1 during a serial part uploads.static MultipartUploadMaterials.Builderbuilder()CipherModecipherMode()ProvidercryptoProvider()SecretKeydataKey()Map<String,String>encryptionContext()Note that the underlying implementation uses a Collections.unmodifiableMap which is immutable.protected voidendPartUpload()Used to mark the completion of a part upload before the next.CiphergetCipher(byte[] iv)When calling with an IV, sanity check that the given IV matches the one in the cipher.byte[]getIv()booleanhasFinalPartBeenSeen()software.amazon.awssdk.services.s3.model.S3Requests3Request()voidsetHasFinalPartBeenSeen(boolean hasFinalPartBeenSeen)
 
- 
- 
- 
Method Detail- 
builderpublic static MultipartUploadMaterials.Builder builder() 
 - 
hasFinalPartBeenSeenpublic final boolean hasFinalPartBeenSeen() 
 - 
setHasFinalPartBeenSeenpublic final void setHasFinalPartBeenSeen(boolean hasFinalPartBeenSeen) 
 - 
getCipherpublic Cipher getCipher(byte[] iv) When calling with an IV, sanity check that the given IV matches the one in the cipher. Then just return the cipher.- Specified by:
- getCipherin interface- CryptographicMaterials
 
 - 
getIvpublic byte[] getIv() 
 - 
beginPartUploadprotected void beginPartUpload(int nextPartNumber, long partContentLength)Can be used to check the next part number must either be the same (if it was a retry) or increment by exactly 1 during a serial part uploads.As a side effect, the partUploadInProgresswill be set to true upon successful completion of this method. Caller of this method is responsible to callendPartUpload()in a finally block once the respective part-upload is completed (either normally or abruptly).- Throws:
- S3EncryptionClientException- if parallel part upload is detected
- See Also:
- endPartUpload()
 
 - 
endPartUploadprotected void endPartUpload() Used to mark the completion of a part upload before the next. Should be invoked in finally block, and must be preceded previously by a call tobeginPartUpload(int, long).- See Also:
- beginPartUpload(int, long)
 
 - 
algorithmSuitepublic AlgorithmSuite algorithmSuite() - Specified by:
- algorithmSuitein interface- CryptographicMaterials
 
 - 
s3Requestpublic software.amazon.awssdk.services.s3.model.S3Request s3Request() - Specified by:
- s3Requestin interface- CryptographicMaterials
 
 - 
encryptionContextpublic Map<String,String> encryptionContext() Note that the underlying implementation uses a Collections.unmodifiableMap which is immutable.- Specified by:
- encryptionContextin interface- CryptographicMaterials
 
 - 
dataKeypublic SecretKey dataKey() - Specified by:
- dataKeyin interface- CryptographicMaterials
 
 - 
cryptoProviderpublic Provider cryptoProvider() - Specified by:
- cryptoProviderin interface- CryptographicMaterials
 
 - 
cipherModepublic CipherMode cipherMode() - Specified by:
- cipherModein interface- CryptographicMaterials
 
 
- 
 
-