java.lang.Object
jakarta.mail.BodyPart
- All Implemented Interfaces:
Part
- Direct Known Subclasses:
MimeBodyPart
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
FieldsModifier and TypeFieldDescriptionprotected MultipartTheMultipartobject containing thisBodyPart, if known.Fields inherited from interface jakarta.mail.Part
ATTACHMENT, INLINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the containingMultipartobject, ornullif not known.Obtains theStreamProvider.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.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 Details
-
parent
TheMultipartobject containing thisBodyPart, if known.- Since:
- JavaMail 1.1
-
-
Constructor Details
-
BodyPart
public BodyPart()Creates a defaultBodyPart.
-
-
Method Details
-
getParent
Return the containingMultipartobject, ornullif not known.- Returns:
- the parent Multipart
-
getStreamProvider
Description copied from interface:PartObtains theStreamProvider. It defaults toSession.getDefaultInstance(java.util.Properties, Authenticator).- Specified by:
getStreamProviderin interfacePart- Returns:
- the StreamProvider.
- Throws:
MessagingException- if errors.
-