com.sun.im.service
Interface MessagePart

All Superinterfaces:
ReadOnlyMessagePart
All Known Subinterfaces:
InviteMessage, Message

public interface MessagePart
extends ReadOnlyMessagePart

a message body part


Method Summary
 void clearContent()
          reset the part's content to "".
 void setContent(byte[] content, java.lang.String enc)
          set the content of this message part using the specified byte array
 void setContent(java.io.InputStream is, java.lang.String enc)
          set the content of this message part using the specified byte array
 void setContent(java.lang.String content)
          set the content of this message part using the specified String object
 void setContent(java.lang.String content, java.lang.String contentType)
          set the content of this message part using the specified String object
 void setContentName(java.lang.String name)
          sets the name of this mesage part
 void setContentType(java.lang.String contentType)
          sets the value of the Content-type header for this part
 
Methods inherited from interface com.sun.im.service.ReadOnlyMessagePart
getBytes, getContent, getContent, getContentEncoding, getContentID, getContentName, getContentType, getInputStream, getSize
 

Method Detail

setContent

public void setContent(byte[] content,
                       java.lang.String enc)
                throws CollaborationException
set the content of this message part using the specified byte array

Parameters:
content - content of the message
enc - content encoding. If non-null, this value is used to reset the content encoding for this part.
Throws:
CollaborationException

setContent

public void setContent(java.io.InputStream is,
                       java.lang.String enc)
                throws CollaborationException
set the content of this message part using the specified byte array

Parameters:
is - content stream
enc - content encoding. If non-null, this value is used to reset the content encoding for this part.
Throws:
CollaborationException

setContent

public void setContent(java.lang.String content)
                throws CollaborationException
set the content of this message part using the specified String object

Parameters:
content - content of the message
Throws:
CollaborationException

setContent

public void setContent(java.lang.String content,
                       java.lang.String contentType)
                throws CollaborationException
set the content of this message part using the specified String object

Parameters:
content - content of the message
contentType - contentType of the message
Throws:
CollaborationException

clearContent

public void clearContent()
                  throws CollaborationException
reset the part's content to "".

Throws:
CollaborationException

setContentType

public void setContentType(java.lang.String contentType)
                    throws CollaborationException
sets the value of the Content-type header for this part

Parameters:
contentType - MIME or extended content-type value. Example: text/xml
Throws:
CollaborationException

setContentName

public void setContentName(java.lang.String name)
                    throws CollaborationException
sets the name of this mesage part

Parameters:
name - filename Example: image.gif
Throws:
CollaborationException