Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.collab
Interface IAttachmentSource

All Known Subinterfaces:
  IAttachment, IEmbeddedAttachment

All Known Implementing Classes:
  InputStreamAttachmentSource, FileAttachmentSource

public interface IAttachmentSource

Supplies data for adding an attachment.

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

Method Detail

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws CollaborationException,
                                              java.io.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
    `java.io.IOException` - if an I/O error occurred

### getName

    public java.lang.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

    public 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
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2005 Compoze Software, Inc. All rights reserved.