org.cip4.jdflib.util.mime
Class MimeHelper

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

public class MimeHelper
extends Object

class to create and write mime files

Author:
Dr. Rainer Prosi, Heidelberger Druckmaschinen AG July 24, 2009

Field Summary
protected  int markSize
           
protected  javax.mail.Multipart theMultipart
           
 
Constructor Summary
MimeHelper()
           
MimeHelper(javax.mail.Multipart mp)
           
 
Method Summary
 BodyPartHelper getBodyPartHelper(int i)
           
 javax.mail.BodyPart[] getBodyParts()
          get all the parts of of a multipart an
 int getCount()
           
 javax.mail.BodyPart getCreatePartByCID(String cid)
          get the MIME BodyPart from a multiPart package with a given cid create one if it does not exist;
 int getMarkSize()
           
 javax.mail.Multipart getMultiPart()
           
 javax.mail.BodyPart getPartByCID(String cid)
          get the MIME BodyPart from a multiPart package with a given cid
 BodyPartHelper getPartHelperByCID(String cid)
          get the MIME BodyPart from a multiPart package with a given cid
 void setMarkSize(int markSize)
          the maximum stream mark for resetting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theMultipart

protected javax.mail.Multipart theMultipart

markSize

protected int markSize
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(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

getPartByCID

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

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


Copyright © 2013. All Rights Reserved.