Interface PlainBytesBuilder

All Superinterfaces:
DataContentBuilder<PlainContent>
All Known Implementing Classes:
PlainBytesBuilder.DefaultPlainBytesBuilder

public interface PlainBytesBuilder extends DataContentBuilder<PlainContent>
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:
  • Method Details

    • bytes

      PlainBytesBuilder bytes(byte[] bytes)
      Sets the byte array content to be wrapped by PlainBytes.
      Parameters:
      bytes - the byte array; must not be null
      Returns:
      this builder instance for method chaining
      Throws:
      NullPointerException - if bytes is null
    • builder

      static PlainBytesBuilder builder()
      Creates a new instance of the default builder implementation.
      Returns:
      a new PlainBytesBuilder