public class AttachmentWrapper extends java.lang.Object implements Attachments
RestClient
in a POST request.MIMETYPE_ATTACHMENT
Constructor and Description |
---|
AttachmentWrapper()
Create empty instance.
|
AttachmentWrapper(java.lang.String name,
byte[] attachment)
Create instance with one byte[] attachment.
|
AttachmentWrapper(java.lang.String name,
java.io.File attachment)
Create instance with one File attachment.
|
AttachmentWrapper(java.lang.String name,
java.io.InputStream attachment)
Create instance with one InputStream attachment.
|
AttachmentWrapper(java.lang.String name,
java.lang.String attachment)
Create instance with one String attachment.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String name,
byte[] attachment)
Add one byte[] attachment.
|
void |
add(java.lang.String name,
java.io.File attachment)
Add one File attachment.
|
void |
add(java.lang.String name,
java.io.InputStream attachment)
Add one InputStream attachment.
|
void |
add(java.lang.String name,
java.lang.String attachment)
Add one String attachment.
|
java.util.Map<java.lang.String,ContentBody> |
getAttachmentParts()
Get attachments parts to add to a multipart request.
|
public AttachmentWrapper()
public AttachmentWrapper(java.lang.String name, byte[] attachment)
name
- attachment nameattachment
- attachment contentpublic AttachmentWrapper(java.lang.String name, java.lang.String attachment)
name
- attachment nameattachment
- attachment contentpublic AttachmentWrapper(java.lang.String name, java.io.InputStream attachment)
name
- attachment nameattachment
- attachment contentpublic AttachmentWrapper(java.lang.String name, java.io.File attachment)
name
- attachment nameattachment
- attachment contentpublic java.util.Map<java.lang.String,ContentBody> getAttachmentParts()
Attachments
getAttachmentParts
in interface Attachments
public void add(java.lang.String name, byte[] attachment)
name
- attachment nameattachment
- attachment contentpublic void add(java.lang.String name, java.lang.String attachment)
name
- attachment nameattachment
- attachment contentpublic void add(java.lang.String name, java.io.InputStream attachment)
name
- attachment nameattachment
- attachment contentpublic void add(java.lang.String name, java.io.File attachment)
name
- attachment nameattachment
- attachment content