Oracle© Collaboration Suite Workspaces Web Services API Reference
10g Release 1 (10.1.2.2)

Part No. B28209-01


oracle.workspaces.ws.beans
Class MessageBodyPart

java.lang.Object
  extended byoracle.workspaces.ws.beans.MessageBodyPart


public class MessageBodyPart
extends java.lang.Object

This class represents a message body part and contains the byte form of the message body part. It is used in sending back a native attachment included in a message.


Constructor Summary
MessageBodyPart()
           

 

Method Summary
 byte[] getByteArray()
          Gets the body part in the form of an array of bytes.
 java.lang.String getContentType()
          Convenience method to get the content type of the body part.Returns null if the Content-Type could not be determined.
 java.lang.String getName()
          Convenience method to get the file name associated with this body part.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

MessageBodyPart

public MessageBodyPart()

Method Detail

getName

public java.lang.String getName()
Convenience method to get the file name associated with this body part.
Returns:
file name

getByteArray

public byte[] getByteArray()
Gets the body part in the form of an array of bytes.
Below is a code snippet in Java illustrating how to get the body part from a byte array:-
Suppose arr is the byte array

ByteArrayInputStream bais = new ByteArrayInputStream(arr);
MimeBodyPart mbp = new MimeBodyPart(bais);
Returns:
byte[] - the byte array representation of the body part.

getContentType

public java.lang.String getContentType()
Convenience method to get the content type of the body part.Returns null if the Content-Type could not be determined. The MIME typing system is used to name Content-types.
Returns:
String - the Content Type of body part

Copyright © 2001, 2006, Oracle. All rights reserved.