public class MimeWriter extends MimeHelper
markSize, theMultipart| Constructor and Description |
|---|
MimeWriter() |
MimeWriter(javax.mail.Multipart mp) |
| Modifier and Type | Method and Description |
|---|---|
void |
buildMimePackage(JDFDoc docJMF,
XMLDoc docJDF,
boolean extendReferenced)
build a MIME package that contains all references in all FileSpecs of a given JDFDoc the doc is modified so that all URLs are cids
|
void |
buildMimePackage(Vector<? extends XMLDoc> vXMLDocs)
Builds a MIME package.
|
void |
createMimePackage()
build an empty MIME package
|
InputStream |
getInputStream()
gets an input s
|
void |
setMIMEDetails(MimeUtil.MIMEDetails _md) |
BodyPartHelper |
updateMultipart(InputStream is,
String cid,
String contentType) |
javax.mail.BodyPart |
updateXMLMultipart(XMLDoc xmlDoc,
String cid) |
void |
writeToDir(File directory)
write a Message to a directory
|
File |
writeToFile(String fileName)
write a Multipart to an output file
|
JDFDoc |
writeToQueue(JDFDoc docJMF,
JDFDoc docJDF,
String strUrl)
submit a multipart file to a queue
|
void |
writeToStream(OutputStream outStream)
write a Multipart to a Stream
|
UrlPart |
writeToURL(String strUrl)
write a Multipart to an output URL File: and http: are currently supported Use HttpURLConnection.getInputStream() to retrieve the http response
|
getBodyPartHelper, getBodyParts, getCount, getCreatePartByCID, getMarkSize, getMultiPart, getPartByCID, getPartHelperByCID, setMarkSizepublic MimeWriter()
public MimeWriter(javax.mail.Multipart mp)
mp - public void setMIMEDetails(MimeUtil.MIMEDetails _md)
_md - public InputStream getInputStream() throws IOException, javax.mail.MessagingException
IOExceptionjavax.mail.MessagingExceptionpublic void createMimePackage()
public BodyPartHelper updateMultipart(InputStream is, String cid, String contentType)
is - cid - contentType - public javax.mail.BodyPart updateXMLMultipart(XMLDoc xmlDoc, String cid)
xmlDoc - cid - public File writeToFile(String fileName)
fileName - the file namepublic void writeToDir(File directory) throws javax.mail.MessagingException, IOException
directory - the directory to use as '.' for writing the mime partsjavax.mail.MessagingExceptionIOExceptionjavax.mail.MessagingExceptionpublic void writeToStream(OutputStream outStream) throws IOException, javax.mail.MessagingException
outStream - the existing output stream, note that a buffered output stream is created in case outStream is unbufferedIOExceptionjavax.mail.MessagingExceptionpublic UrlPart writeToURL(String strUrl) throws IOException, javax.mail.MessagingException
strUrl - the URL to write toHttpURLConnection the opened http connection, null in case of error or fileIOExceptionjavax.mail.MessagingExceptionpublic void buildMimePackage(Vector<? extends XMLDoc> vXMLDocs)
vXMLDocs - the Vector of XMLDoc representing the JMF and JDFs to be stored as the first part of the package tpublic void buildMimePackage(JDFDoc docJMF, XMLDoc docJDF, boolean extendReferenced)
docJMF - the JDFDoc representation of the JMF that references the jdf to package, if null only the jdf is packaged note that the URL of docJDF must
already be specified as a CIDdocJDF - the JDFDoc representation of the JDF to packageextendReferenced - if true, also package any further reeferenced filespublic JDFDoc writeToQueue(JDFDoc docJMF, JDFDoc docJDF, String strUrl) throws IOException, javax.mail.MessagingException
docJMF - the jmf document containing the submitqueueentry or resubmitqueueentrydocJDF - the jdf to submitstrUrl - the url to submit toIOExceptionjavax.mail.MessagingExceptionCopyright © 2013. All Rights Reserved.