Skip navigation links

Java API Reference for Oracle Infrastructure Web Services
11
Release 1 (11.1.1)

E10654-02


oracle.webservices.attachments
Class AttachmentFactory

java.lang.Object
  extended by oracle.webservices.attachments.AttachmentFactory


public abstract class AttachmentFactory
extends Object

AttachmentFactory is used to create Attachment and Attachments objects for streaming attachments.


Constructor Summary
AttachmentFactory()
           

 

Method Summary
abstract  Attachment createAttachment(String id, DataHandler dataHandler)
          Create an Attachment from a DataHandler.
abstract  Attachment createAttachment(String id, String contentType, InputStream attachmentStream)
          Create and Attachment from an InputStream.
abstract  Attachments createAttachments()
          Create an Attachments object.
static AttachmentFactory newInstance()
          Get a new instance of the AttachmentFactory.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

AttachmentFactory

public AttachmentFactory()

Method Detail

newInstance

public static AttachmentFactory newInstance()
Get a new instance of the AttachmentFactory.
Returns:
The AttachmentFactory

createAttachments

public abstract Attachments createAttachments()
Create an Attachments object. Attachments is a collection of attachments for a streaming attachments interaction.
Returns:
An Attachments object

createAttachment

public abstract Attachment createAttachment(String id,
                                            DataHandler dataHandler)
Create an Attachment from a DataHandler.
Parameters:
id - The Attachment ID. This corresponds to the Content-ID MIME header
dataHandler - The DataHandler representing the attachment data
Returns:
A new Attachment object that can be added to an OutgoingAttachemnts object

createAttachment

public abstract Attachment createAttachment(String id,
                                            String contentType,
                                            InputStream attachmentStream)
Create and Attachment from an InputStream.
Parameters:
id - The Attachment ID. This corresponds to the Content-ID MIME header
contentType - The Content-Type of the Attachment (e.g. text/plain, image/jpeg)
attachmentStream - An InputStream containing the binary data for the attachment
Returns:
A new Attachment object that can be added to an OutgoingAttachemnts object

Skip navigation links

Copyright © 2006, 2009 Oracle. All Rights Reserved.