Class MimeHelper

  • Direct Known Subclasses:
    MimeReader, MimeWriter

    public class MimeHelper
    extends java.lang.Object
    class to create and write mime files
    • Field Detail

      • theMultipart

        protected javax.mail.Multipart theMultipart
      • markSize

        protected int markSize
      • log

        protected static final org.apache.commons.logging.Log log
    • Constructor Detail

      • MimeHelper

        public MimeHelper()
      • MimeHelper

        public MimeHelper​(javax.mail.Multipart mp)
        Parameters:
        mp -
    • Method Detail

      • getCount

        public int getCount()
        Returns:
      • getMultiPart

        public javax.mail.Multipart getMultiPart()
        Returns:
      • getCreatePartByCID

        public javax.mail.BodyPart getCreatePartByCID​(java.lang.String cid)
        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

        public BodyPartHelper getCreatePartByLocalName​(java.lang.String name)
        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

        public javax.mail.BodyPart getPartByCID​(java.lang.String cid)
        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

        public BodyPartHelper getPartHelperByCID​(java.lang.String cid)
        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

        public BodyPartHelper getPartHelperByAttribute​(java.lang.String key,
                                                       java.lang.String value)
        get the MIME BodyPart from a multiPart package with a given header
        Returns:
        BodyPartHelper the matching BodyPart, null if none is found
      • getBodyPartHelper

        public BodyPartHelper getBodyPartHelper​(int i)
        Parameters:
        i -
        Returns:
      • getBodyParts

        public javax.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

        public BodyPartHelper getPartHelperByLocalName​(java.lang.String name)