Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Server Web Services Java API Reference 10g Release 3 (10.1.3) B25988-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.webservices.attachments
Class AttachmentFactory

`java.lang.Object
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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright © 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD