Class MimeHelper

java.lang.Object
org.cip4.jdflib.util.mime.MimeHelper
Direct Known Subclasses:
MimeReader, MimeWriter

public class MimeHelper extends Object
class to create and write mime files
  • 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

      public jakarta.mail.BodyPart getCreatePartByCID(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(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 jakarta.mail.BodyPart getPartByCID(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(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(String key, 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 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

      public BodyPartHelper getPartHelperByLocalName(String name)