Class PlainBytesBuilder.DefaultPlainBytesBuilder
java.lang.Object
zeroecho.sdk.builders.core.PlainBytesBuilder.DefaultPlainBytesBuilder
- All Implemented Interfaces:
DataContentBuilder<PlainContent>, PlainBytesBuilder
- Enclosing interface:
PlainBytesBuilder
public static final class PlainBytesBuilder.DefaultPlainBytesBuilder
extends Object
implements PlainBytesBuilder
Default implementation of the
PlainBytesBuilder interface.
Builds a PlainBytes instance wrapping the specified byte array.
-
Nested Class Summary
Nested classes/interfaces inherited from interface PlainBytesBuilder
PlainBytesBuilder.DefaultPlainBytesBuilder -
Method Summary
Modifier and TypeMethodDescriptionbuild(boolean encrypt) Constructs and returns a newDataContentinstance based on the builder's current configuration.bytes(byte[] bytes) Sets the byte array content to be wrapped byPlainBytes.
-
Method Details
-
bytes
Description copied from interface:PlainBytesBuilderSets the byte array content to be wrapped byPlainBytes.- Specified by:
bytesin interfacePlainBytesBuilder- Parameters:
bytes- the byte array; must not be null- Returns:
- this builder instance for method chaining
-
build
Description copied from interface:DataContentBuilderConstructs and returns a newDataContentinstance based on the builder's current configuration.- Specified by:
buildin interfaceDataContentBuilder<PlainContent>- Parameters:
encrypt- whether the resultingDataContentshould be configured for encryption (true) or decryption (false). In encryption mode, additional headers or metadata may be inserted into the stream which must be retained for successful decryption.- Returns:
- the constructed
DataContentinstance
-