Package io.micronaut.email
Class Attachment.Builder
java.lang.Object
io.micronaut.email.Attachment.Builder
- Enclosing class:
- Attachment
Attachment's builder.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull Attachment
build()
@NonNull Attachment.Builder
content
(@io.micronaut.core.annotation.NonNull byte[] content) @NonNull Attachment.Builder
@NonNull Attachment.Builder
content
(@NonNull InputStream inputStream) @NonNull Attachment.Builder
contentType
(@NonNull String contentType) @NonNull Attachment.Builder
disposition
(@NonNull String disposition) @NonNull Attachment.Builder
@NonNull Attachment.Builder
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
filename
- Parameters:
filename
- filename to show up in email- Returns:
- Attachment's builder
-
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
- Parameters:
file
- file- Returns:
- Attachment's builder
-
content
- Parameters:
inputStream
- Content's inputStream- Returns:
- Attachment's builder
-
id
- Parameters:
id
- content identifier- Returns:
- Attachment's builder
-
disposition
- Parameters:
disposition
- content disposition- Returns:
- Attachment's builder
-
build
- Returns:
- an Attachment.
-