Package org.cip4.jdflib.util.mime
Class MimeHelper
java.lang.Object
org.cip4.jdflib.util.mime.MimeHelper
- Direct Known Subclasses:
MimeReader,MimeWriter
class to create and write mime files
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.commons.logging.Logprotected intprotected jakarta.mail.Multipart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBodyPartHelper(int i) jakarta.mail.BodyPart[]get all the parts of of a multipart anintgetCount()jakarta.mail.BodyPartgetCreatePartByCID(String cid) get the MIME BodyPart from a multiPart package with a given cid create one if it does not exist;get the MIME BodyPart from a multiPart package with a given cid create one if it does not exist;intjakarta.mail.Multipartjakarta.mail.BodyPartgetPartByCID(String cid) get the MIME BodyPart from a multiPart package with a given cidgetPartHelperByAttribute(String key, String value) get the MIME BodyPart from a multiPart package with a given headergetPartHelperByCID(String cid) get the MIME BodyPart from a multiPart package with a given cidvoidsetMarkSize(int markSize) the maximum stream mark for resetting
-
Field Details
-
theMultipart
protected jakarta.mail.Multipart theMultipart -
markSize
protected int markSize -
log
protected static final org.apache.commons.logging.Log log
-
-
Constructor Details
-
MimeHelper
public MimeHelper() -
MimeHelper
public MimeHelper(jakarta.mail.Multipart mp) - Parameters:
mp-
-
-
Method Details
-
getCount
public int getCount()- Returns:
-
getMultiPart
public jakarta.mail.Multipart getMultiPart()- Returns:
-
getCreatePartByCID
get the MIME BodyPart from a multiPart package with a given cid create one if it does not exist;- Parameters:
cid- the cid of the requested bodypart- Returns:
- BodyPart the matching BodyPart, null if none is found
-
getCreatePartByLocalName
get the MIME BodyPart from a multiPart package with a given cid create one if it does not exist;- Parameters:
name- the cid of the requested bodypart- Returns:
- BodyPart the matching BodyPart, null if none is found
-
getPartByCID
get the MIME BodyPart from a multiPart package with a given cid- Parameters:
cid- the cid of the requested bodypart- Returns:
- BodyPart the matching BodyPart, null if none is found
-
getPartHelperByCID
get the MIME BodyPart from a multiPart package with a given cid- Parameters:
cid- the cid of the requested bodypart- Returns:
- BodyPartHelper the matching BodyPart, null if none is found
-
getPartHelperByAttribute
get the MIME BodyPart from a multiPart package with a given header- Returns:
- BodyPartHelper the matching BodyPart, null if none is found
-
getBodyPartHelper
- Parameters:
i-- Returns:
-
getBodyParts
public jakarta.mail.BodyPart[] getBodyParts()get all the parts of of a multipart an- Returns:
- the array of parts, null if snafu...
-
getMarkSize
public int getMarkSize()- Returns:
- the markSize, i.e. the maximum stream mark for resetting
-
setMarkSize
public void setMarkSize(int markSize) the maximum stream mark for resetting- Parameters:
markSize- the markSize to set
-
getPartHelperByLocalName
-