Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.messaging.common
Class MultiPart

java.lang.Object
  extended byoracle.panama.messaging.common.MultiPart

All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class MultiPart
extends java.lang.Object
implements java.io.Externalizable

This class is a container class for the parts of a message.

See Also:
MessagePart, Serialized Form

Constructor Summary
MultiPart()
Constructor.

Method Summary
void addMessagePart(MessagePart part)
Add a message part to this multipart.
void addMessagePart(MessagePart part, int index)
Add a message part to this multipart at a given index.
boolean equals(java.lang.Object other)
Checks equality of two MultiPart objects.
MessagePart getMessagePart(int index)
Get the specified message part.
int getPartCount()
Get the number of part count.
int hashCode()
Generates and return hash code for the instance
void readExternal(java.io.ObjectInput oi)
Read a multipart instance from a stream.
void removeMessagePart(int index)
Remove a specified message part.
void removeMessagePart(MessagePart part)
Remove a specified message part.
java.lang.String toString()
Overrides the default toString implementation.
void writeExternal(java.io.ObjectOutput oo)
Write a multipart instance to a stream.

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

Constructor Detail

MultiPart

public MultiPart()
Constructor.

Method Detail

addMessagePart

public void addMessagePart(MessagePart part)
Add a message part to this multipart.
Parameters:
part - message part to add.

addMessagePart

public void addMessagePart(MessagePart part,
                           int index)
Add a message part to this multipart at a given index.
Parameters:
part - message part to add.
index - the position to add.

equals

public boolean equals(java.lang.Object other)
Checks equality of two MultiPart objects.
Parameters:
other - MultiPart object to be tested for equality with "this" instance.
Returns:
true if the two instances are equal else returns false.

getMessagePart

public MessagePart getMessagePart(int index)
Get the specified message part.
Parameters:
index - the index of the part to get.
Returns:
the message part of the given index.

getPartCount

public int getPartCount()
Get the number of part count.
Returns:
the part count.

hashCode

public int hashCode()
Generates and return hash code for the instance
Returns:
hash code.

readExternal

public void readExternal(java.io.ObjectInput oi)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Read a multipart instance from a stream.
Specified by:
readExternal in interface java.io.Externalizable
Parameters:
oi - the stream to read from.
Throws:
java.io.IOException
java.lang.ClassNotFoundException

removeMessagePart

public void removeMessagePart(int index)
Remove a specified message part.
Parameters:
index - the index of the part to remove.

removeMessagePart

public void removeMessagePart(MessagePart part)
Remove a specified message part.
Parameters:
part - the message part to remove.

toString

public java.lang.String toString()
Overrides the default toString implementation.
Returns:
string containing all MessagePart details.

writeExternal

public void writeExternal(java.io.ObjectOutput oo)
                   throws java.io.IOException
Write a multipart instance to a stream.
Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
oo - the stream to write to.
Throws:
java.io.IOException

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.