Interface PlainBytesBuilder
- All Superinterfaces:
DataContentBuilder<PlainContent>
- All Known Implementing Classes:
PlainBytesBuilder.DefaultPlainBytesBuilder
Builder interface for constructing
PlainBytes instances that
encapsulate unencrypted byte array content.
This builder allows specifying a raw byte array to be wrapped as
PlainContent, which can be used as input for cryptographic operations
or as standalone plaintext data.
The DataContentBuilder.build(boolean) method accepts an encrypt flag for API
consistency, but the flag has no effect for plain byte content.
Usage example:
PlainContent content = PlainBytesBuilder.builder()
.bytes(new byte[] { 1, 2, 3, 4 })
.build(false); // encrypt flag is ignored for PlainBytes
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classDefault implementation of thePlainBytesBuilderinterface. -
Method Summary
Modifier and TypeMethodDescriptionstatic PlainBytesBuilderbuilder()Creates a new instance of the default builder implementation.bytes(byte[] bytes) Sets the byte array content to be wrapped byPlainBytes.Methods inherited from interface DataContentBuilder
build
-
Method Details
-
bytes
Sets the byte array content to be wrapped byPlainBytes.- Parameters:
bytes- the byte array; must not be null- Returns:
- this builder instance for method chaining
- Throws:
NullPointerException- ifbytesis null
-
builder
Creates a new instance of the default builder implementation.- Returns:
- a new
PlainBytesBuilder
-