Class PlainFileBuilder.DefaultPlainFileBuilder

java.lang.Object
zeroecho.sdk.builders.core.PlainFileBuilder.DefaultPlainFileBuilder
All Implemented Interfaces:
DataContentBuilder<PlainContent>, PlainFileBuilder
Enclosing interface:
PlainFileBuilder

public static final class PlainFileBuilder.DefaultPlainFileBuilder extends Object implements PlainFileBuilder
Default implementation of the PlainFileBuilder interface.

Builds a PlainFile instance using the specified URL.

  • Method Details

    • url

      public PlainFileBuilder url(URL url)
      Description copied from interface: PlainFileBuilder
      Sets the URL of the file to be used as the plain content source.
      Specified by:
      url in interface PlainFileBuilder
      Parameters:
      url - the URL of the file; must not be null
      Returns:
      this builder instance
    • build

      public PlainContent build(boolean encrypt)
      Description copied from interface: DataContentBuilder
      Constructs and returns a new DataContent instance based on the builder's current configuration.
      Specified by:
      build in interface DataContentBuilder<PlainContent>
      Parameters:
      encrypt - whether the resulting DataContent should 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 DataContent instance