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

## com.compoze.collab
Interface IAttachmentSource

All Known Subinterfaces:
  IAttachment, IEmbeddedAttachment

All Known Implementing Classes:
  FileAttachmentSource, InputStreamAttachmentSource

    public interface IAttachmentSource

Supplies data for adding an attachment.

Method Summary
`InputStream` | `getInputStream()` Gets the input stream for this attachment source.
`String` | `getName()` Gets the name of the attachment source.
`int` | `getSize()` Gets the size of the attachment in bytes.

Method Detail

### getInputStream

    InputStream getInputStream()
                               throws CollaborationException,
                                      IOException

  Gets the input stream for this attachment source. If the size is not known (`getSize()` returns `-1`) then it must be safe to call this method multiple times so that we can read the stream first to get a size.

  Returns
    the `InputStream` to the attachment data (not `null`)
  Throws
    `CollaborationException` - if there was a problem getting the stream from the source
    `IOException` - if an I/O error occurred

### getName

    String getName()
                   throws CollaborationException

  Gets the name of the attachment source.

  Returns
    the name of the attachment (not `null`)
  Throws
    `CollaborationException` - if there was a problem getting the name

### getSize

    int getSize()
                throws CollaborationException

  Gets the size of the attachment in bytes.

  Returns
    the size of the attachment (or `-1` if the size is not known, in which case it must be safe to call `getInputStream()` multiple times so that we can read the stream first to get a size
  Throws
    `CollaborationException` - if there was a problem getting the size

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems, Inc. All Rights Reserved