com.sun.im.service
Interface ReadOnlyMessagePart

All Known Subinterfaces:
InviteMessage, Message, MessagePart, ReadOnlyMessage

public interface ReadOnlyMessagePart

a message body part


Method Summary
 byte[] getBytes(java.lang.String encoding)
          return the content of this message part in bytes
 java.lang.String getContent()
          return the content of this message part
 java.lang.String getContent(java.lang.String contentType)
          return the content of this message part
 java.lang.String getContentEncoding()
          returns the value of the Content-Encoding: header/property
 java.lang.String getContentID()
          returns the value of the Content-ID: header/property
 java.lang.String getContentName()
          returns the value of the Content-ID: header/property
 java.lang.String getContentType()
          returns the value of the Content-type header for this part
 java.io.InputStream getInputStream()
          return a input stream set to the beginning of the content of this message part.
 int getSize()
          returns the size of this message part in bytes.
 

Method Detail

getSize

public int getSize()
            throws CollaborationException
returns the size of this message part in bytes.

Throws:
CollaborationException

getContentID

public java.lang.String getContentID()
returns the value of the Content-ID: header/property


getContentEncoding

public java.lang.String getContentEncoding()
returns the value of the Content-Encoding: header/property


getContentName

public java.lang.String getContentName()
returns the value of the Content-ID: header/property


getInputStream

public java.io.InputStream getInputStream()
                                   throws CollaborationException
return a input stream set to the beginning of the content of this message part.

Returns:
message part's content
Throws:
CollaborationException

getContent

public java.lang.String getContent()
                            throws CollaborationException
return the content of this message part

Returns:
message part's content
Throws:
CollaborationException

getBytes

public byte[] getBytes(java.lang.String encoding)
                throws CollaborationException
return the content of this message part in bytes

Returns:
message part's content
Throws:
CollaborationException

getContent

public java.lang.String getContent(java.lang.String contentType)
                            throws CollaborationException
return the content of this message part

Parameters:
contentType - - contentType of the message
Returns:
message part's content
Throws:
CollaborationException

getContentType

public java.lang.String getContentType()
returns the value of the Content-type header for this part

Returns:
message part's MIME content type