|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cip4.jdflib.util.mime.BodyPartHelper
public class BodyPartHelper
| Field Summary | |
|---|---|
protected javax.mail.BodyPart |
theBodyPart
|
| Constructor Summary | |
|---|---|
BodyPartHelper()
creates a new bodypart |
|
BodyPartHelper(javax.mail.BodyPart bp)
|
|
| Method Summary | |
|---|---|
void |
createBodyPart()
|
javax.mail.BodyPart |
createFromURL(String urlString)
|
javax.mail.BodyPart |
getBodyPart()
|
String |
getContentID()
get the ContentID header of a bodypart a string |
String |
getFileName()
get the filename header of a bodypart a string if no file name is set, a unique filename is generated from cid and content type |
int |
getIndex()
|
InputStream |
getInputStream()
|
JDFDoc |
getJDFDoc()
get the JDF Doc from a given body part |
XMLDoc |
getXMLDoc()
get the JDF Doc from a given body part |
boolean |
matchesCID(String cid)
check if a BodyPart matches a given cid |
void |
setContent(XMLDoc xmlDoc)
sets the content of a bodypart to the xmlDoc - correctly handling non-ascii features and setting the correct content type |
void |
setContentID(String cid)
|
void |
setFileName(String path)
set the filename header of a bodypart to a string |
void |
writeToDir(File directory)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.mail.BodyPart theBodyPart
| Constructor Detail |
|---|
public BodyPartHelper(javax.mail.BodyPart bp)
bp - public BodyPartHelper()
| Method Detail |
|---|
public javax.mail.BodyPart getBodyPart()
public void createBodyPart()
public void setContentID(String cid)
cid - public void setFileName(String path)
path - the path to setpublic String getFileName()
public boolean matchesCID(String cid)
cid - the cid string any '<' '>' or 'cid:' prefixes are removed if null, anything matches
public String getContentID()
public void setContent(XMLDoc xmlDoc)
throws javax.mail.MessagingException,
IOException
xmlDoc - the xmlDoc to fill in
javax.mail.MessagingException
IOExceptionpublic javax.mail.BodyPart createFromURL(String urlString)
urlString -
public JDFDoc getJDFDoc()
public XMLDoc getXMLDoc()
public void writeToDir(File directory)
throws IOException,
javax.mail.MessagingException
directory -
javax.mail.MessagingException
IOExceptionpublic int getIndex()
public InputStream getInputStream()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||