Compoze Software, Inc.

com.compoze.collab
Class InputStreamAttachmentSource


java.lang.Object

  |

  +--com.compoze.collab.InputStreamAttachmentSource

All Implemented Interfaces:
IAttachmentSource

public class InputStreamAttachmentSource
extends java.lang.Object
implements IAttachmentSource

An IAttachmentSource that gets its data from an InputStream.


Constructor Summary
InputStreamAttachmentSource(java.io.InputStream input, java.lang.String sName, int iSize)
          Constructor.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStreamAttachmentSource


public InputStreamAttachmentSource(java.io.InputStream input,
                                   java.lang.String sName,
                                   int iSize)
Constructor.
Method Detail

getInputStream


public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: IAttachmentSource
Gets the input stream for this attachment source. If the size is not known (IAttachmentSource.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.
Specified by:
getInputStream in interface IAttachmentSource
Following copied from interface: com.compoze.collab.IAttachmentSource
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()
Description copied from interface: IAttachmentSource
Gets the name of the attachment source.
Specified by:
getName in interface IAttachmentSource
Following copied from interface: com.compoze.collab.IAttachmentSource
Returns:
the name of the attachment (not null)
Throws:
CollaborationException - if there was a problem getting the name

getSize


public int getSize()
Description copied from interface: IAttachmentSource
Gets the size of the attachment in bytes.
Specified by:
getSize in interface IAttachmentSource
Following copied from interface: com.compoze.collab.IAttachmentSource
Returns:
the size of the attachment (or -1 if the size is not known, in which case it must be safe to call IAttachmentSource.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

Compoze Software, Inc.

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