Package oracle.soa.api.message
Class AttachmentFactory
java.lang.Object
oracle.soa.api.message.AttachmentFactory
Creates Attachment instances, which can be added to a Message.
Example:
Example:
Attachment attachment =
AttachmentFactory.getInstance().createAttachment("xyz",
"plain/text; charset=us-ascii",
"Attachment Content".getBytes("us-ascii"));
message.addAttachment(attachment);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract AttachmentcreateAttachment(String contentId, String contentType, byte[] content) Creates a message attachmentabstract AttachmentcreateAttachment(String contentId, String contentType, InputStream content) Creates a message attachmentabstract AttachmentcreateAttachment(String contentId, String contentType, InputStream content, String transferEncoding) Creates a message attachmentabstract AttachmentcreateAttachment(String contentId, String contentType, String partName, byte[] content, String transferEncoding) Creates a message attachmentstatic AttachmentFactory
-
Constructor Details
-
AttachmentFactory
public AttachmentFactory()
-
-
Method Details
-
getInstance
-
createAttachment
Creates a message attachment- Parameters:
contentId- the Content-ID value of the attachment; may be nullcontentType- the Content-Type value of the attachment; may be nullcontent- the attachment content- Returns:
- An Attachment object
-
createAttachment
public abstract Attachment createAttachment(String contentId, String contentType, String partName, byte[] content, String transferEncoding) Creates a message attachment- Parameters:
contentId- the Content-ID value of the attachment; may be nullcontentType- the Content-Type value of the attachment; may be nullpartName- the partName this payload maps to.content- the attachment contenttransferEncoding- the transfer encoding to be used for the attachment- Returns:
- An Attachment object
-
createAttachment
public abstract Attachment createAttachment(String contentId, String contentType, InputStream content) Creates a message attachment- Parameters:
contentId- the Content-ID value of the attachment; may be nullcontentType- the Content-Type value of the attachment; may be nullcontent- the attachment content- Returns:
- An Attachment object
-
createAttachment
public abstract Attachment createAttachment(String contentId, String contentType, InputStream content, String transferEncoding) Creates a message attachment- Parameters:
contentId- the Content-ID value of the attachment; may be nullcontentType- the Content-Type value of the attachment; may be nullcontent- the attachment contenttransferEncoding- the transfer encoding to be used for the attachment- Returns:
- An Attachment object
-