Class Attachment.Builder
- java.lang.Object
-
- de.bmiag.tapir.execution.attachment.Attachment.Builder
-
- Enclosing class:
- Attachment
public static final class Attachment.Builder extends java.lang.Object
Builds instances of typeAttachment
.Builder
is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setCharset(java.nio.charset.Charset charset)
Initializes the default value for thecharset
attribute.void
setCharset(java.util.Optional<java.nio.charset.Charset> charset)
Initializes the value for thecharset
attribute.void
setContent(byte[] content)
Initializes the value for thecontent
attribute.void
setMimeType(org.springframework.util.MimeType mimeType)
Initializes the value for themimeType
attribute.void
setName(java.lang.String name)
Initializes the value for thename
attribute.
-
-
-
Method Detail
-
setName
public void setName(java.lang.String name)
Initializes the value for thename
attribute.- Parameters:
name
- The value for name
-
setMimeType
public void setMimeType(org.springframework.util.MimeType mimeType)
Initializes the value for themimeType
attribute.- Parameters:
mimeType
- The value for mimeType
-
setContent
public void setContent(byte[] content)
Initializes the value for thecontent
attribute.- Parameters:
content
- The value for content
-
setCharset
public void setCharset(java.util.Optional<java.nio.charset.Charset> charset)
Initializes the value for thecharset
attribute.- Parameters:
charset
- The value for charset
-
setCharset
public void setCharset(java.nio.charset.Charset charset)
Initializes the default value for thecharset
attribute.- Parameters:
charset
- The value for charset
-
-