Class Configuration.Attachment
- Enclosing class:
Configuration
A type containing attachment data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetData
(byte[] value) The binary content of the attachment.setDescription
(String value) The description of the attachment.setMimeType
(String value) The MIME type of the attachment.The file name associated with the attachment.IfsetData(byte[])
is not set or set tonull
, the attachment will be retrieved from this URL.
-
Constructor Details
-
Attachment
public Attachment()
-
-
Method Details
-
setData
The binary content of the attachment. May be
null
.- Returns:
- The current
Configuration.Attachment
instance.
-
setUrl
If
setData(byte[])
is not set or set tonull
, the attachment will be retrieved from this URL.If this is "#" the input document URL is used instead.
- Returns:
- The current
Configuration.Attachment
instance.
-
setName
The file name associated with the attachment. It is recommended to specify the correct file extension. If this is not set or
null
the name is derived fromsetUrl(String)
.- Returns:
- The current
Configuration.Attachment
instance.
-
setDescription
The description of the attachment. If this is not set or
null
the value ofsetName(String)
is used.- Returns:
- The current
Configuration.Attachment
instance.
-
setMimeType
The MIME type of the attachment. If this is not set,
null
or the empty string, detection is attempted or the default valueapplication/octet-stream
is used.
Please note that viewers generally ignore the MIME type in favor of the file extension. However, automatic processing of PDF documents may require attachments to have specific MIME types.- Returns:
- The current
Configuration.Attachment
instance.
-