|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.hunnysoft.jmime.Node
com.hunnysoft.jmime.Entity
com.hunnysoft.jmime.BodyPart
Class that represents a MIME body part.
BodyPart represents a body part, as
described in RFC 2045 and
RFC 2046.
A body part is an entity, so it has a collection of header
fields and a body. A body part is different from a
message in that a body part is part of a multipart body.
In Hunny JMIME, a BodyPart is a subclass of Entity; therefore, it contains both a Headers object and a
Body object, and it is contained in a multipart
Body object.
In the document tree representation of message, a
BodyPart object is always an intermediate node, having a
parent node and child nodes. The parent node is the Body
object that contains it. The child nodes are the Headers
object and the Body object it contains. (See the
documentation for Node for a discussion of the tree
representation of a message.)
To get the contained Headers object, call the inherited
Entity.headers() method. To get the contained
Body object, use the inherited Entity.body()
property.
| Field Summary |
| Fields inherited from class com.hunnysoft.jmime.Node |
mIsModified, mParent, mString |
| Constructor Summary | |
BodyPart()
Default constructor. |
|
BodyPart(BodyPart other)
Copy constructor. |
|
BodyPart(ByteString bstr)
Constructor that takes an initial byte string argument. |
|
| Method Summary | |
java.lang.Object |
clone()
Creates a copy of this object. |
| Methods inherited from class com.hunnysoft.jmime.Entity |
assemble, body, headers, parse, setBody, setHeaders |
| Methods inherited from class com.hunnysoft.jmime.Node |
_setString, isModified, parent, setModified, setParent, setString, string, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BodyPart()
This constructor sets the BodyPart object's string
representation to the empty string and sets its parent node to
null.
public BodyPart(BodyPart other)
This constructor performs a deep copy of its argument. The
parent node of the new BodyPart object is set to
null.
other - BodyPart instance to copypublic BodyPart(ByteString bstr)
This constructor sets the BodyPart object's string
representation to bstr and sets its parent node to
null.
Normally, you call the parse() method immediately
after this constructor to create the broken-down
representation.
bstr - initial value for the string representation| Method Detail |
public java.lang.Object clone()
This method, inherited from Object, creates a new
BodyPart object that has the same value as this
BodyPart object. The parent node of the new
BodyPart object is set to null.
clone in class Node
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||