Package javax.mail
Class BodyPart
- java.lang.Object
-
- javax.mail.BodyPart
-
- All Implemented Interfaces:
Part
- Direct Known Subclasses:
MimeBodyPart
public abstract class BodyPart extends java.lang.Object implements Part
This class models a Part that is contained within a Multipart. This is an abstract class. Subclasses provide actual implementations.BodyPart implements the Part interface. Thus, it contains a set of attributes and a "content".
-
-
Field Summary
Fields Modifier and Type Field Description protected MultipartparentTheMultipartobject containing thisBodyPart, if known.-
Fields inherited from interface javax.mail.Part
ATTACHMENT, INLINE
-
-
Constructor Summary
Constructors Constructor Description BodyPart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultipartgetParent()Return the containingMultipartobject, ornullif not known.(package private) voidsetParent(Multipart parent)Set the parent of thisBodyPartto be the specifiedMultipart.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.mail.Part
addHeader, getAllHeaders, getContent, getContentType, getDataHandler, getDescription, getDisposition, getFileName, getHeader, getInputStream, getLineCount, getMatchingHeaders, getNonMatchingHeaders, getSize, isMimeType, removeHeader, setContent, setContent, setDataHandler, setDescription, setDisposition, setFileName, setHeader, setText, writeTo
-
-
-
-
Field Detail
-
parent
protected Multipart parent
TheMultipartobject containing thisBodyPart, if known.- Since:
- JavaMail 1.1
-
-
Method Detail
-
getParent
public Multipart getParent()
Return the containingMultipartobject, ornullif not known.- Returns:
- the parent Multipart
-
setParent
void setParent(Multipart parent)
Set the parent of thisBodyPartto be the specifiedMultipart. Normally called byMultipart'saddBodyPartmethod.parentmay benullif theBodyPartis being removed from its containingMultipart.- Since:
- JavaMail 1.1
-
-