|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.http.client.attachments.AttachmentWrapper
public class AttachmentWrapper
Use this class to wrap possible attachment values to provide them to the
RestClient in a POST request.
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.smila.http.client.Attachments |
|---|
MIMETYPE_ATTACHMENT |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttachmentWrapper()
public AttachmentWrapper(java.lang.String name,
byte[] attachment)
name - attachment nameattachment - attachment content
public AttachmentWrapper(java.lang.String name,
java.lang.String attachment)
name - attachment nameattachment - attachment content
public AttachmentWrapper(java.lang.String name,
java.io.InputStream attachment)
name - attachment nameattachment - attachment content
public AttachmentWrapper(java.lang.String name,
java.io.File attachment)
name - attachment nameattachment - attachment content| Method Detail |
|---|
public 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 content
public void add(java.lang.String name,
java.lang.String attachment)
name - attachment nameattachment - attachment content
public void add(java.lang.String name,
java.io.InputStream attachment)
name - attachment nameattachment - attachment content
public void add(java.lang.String name,
java.io.File attachment)
name - attachment nameattachment - attachment content
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||