Interface PlainFileBuilder

All Superinterfaces:
DataContentBuilder<PlainContent>
All Known Implementing Classes:
PlainFileBuilder.DefaultPlainFileBuilder

public interface PlainFileBuilder extends DataContentBuilder<PlainContent>
Builder interface for constructing PlainContent instances that represent unencrypted file-based content sourced from a URL.

This builder allows specifying the source URL of a file to be used as plain (non-encrypted) content. It is typically used as input for cryptographic operations or for representing raw file data.

The DataContentBuilder.build(boolean) method accepts an encrypt flag to comply with the DataContentBuilder interface; however, this flag is ignored for plain content types.

Usage example:

PlainContent plainFile = PlainFileBuilder.builder()
    .url(new URL("file:///path/to/file.txt"))
    .build(true); // encrypt flag is ignored for PlainFile
See Also:
  • Method Details

    • url

      Sets the URL of the file to be used as the plain content source.
      Parameters:
      url - the URL of the file; must not be null
      Returns:
      this builder instance
    • builder

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