Class Attachment.Builder

java.lang.Object
io.micronaut.email.Attachment.Builder
Enclosing class:
Attachment

public static class Attachment.Builder extends Object
Attachment's builder.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • filename

      @NonNull public @NonNull Attachment.Builder filename(@NonNull @NonNull String filename)
      Parameters:
      filename - filename to show up in email
      Returns:
      Attachment's builder
    • contentType

      @NonNull public @NonNull Attachment.Builder contentType(@NonNull @NonNull String contentType)
      Parameters:
      contentType - file content type
      Returns:
      Attachment's builder
    • content

      @NonNull public @NonNull Attachment.Builder content(@NonNull @io.micronaut.core.annotation.NonNull byte[] content)
      Parameters:
      content - file content
      Returns:
      Attachment's builder
    • content

      @NonNull public @NonNull Attachment.Builder content(@NonNull @NonNull File file)
      Parameters:
      file - file
      Returns:
      Attachment's builder
    • content

      @NonNull public @NonNull Attachment.Builder content(@NonNull @NonNull InputStream inputStream)
      Parameters:
      inputStream - Content's inputStream
      Returns:
      Attachment's builder
    • id

      @NonNull public @NonNull Attachment.Builder id(@NonNull @NonNull String id)
      Parameters:
      id - content identifier
      Returns:
      Attachment's builder
    • disposition

      @NonNull public @NonNull Attachment.Builder disposition(@NonNull @NonNull String disposition)
      Parameters:
      disposition - content disposition
      Returns:
      Attachment's builder
    • build

      @NonNull public @NonNull Attachment build()
      Returns:
      an Attachment.