|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cip4.jdflib.util.mime.MimeHelper
org.cip4.jdflib.util.mime.MimeWriter
public class MimeWriter
class to create and write mime files
| Field Summary |
|---|
| Fields inherited from class org.cip4.jdflib.util.mime.MimeHelper |
|---|
markSize, theMultipart |
| Constructor Summary | |
|---|---|
MimeWriter()
|
|
MimeWriter(javax.mail.Multipart mp)
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class org.cip4.jdflib.util.mime.MimeHelper |
|---|
getBodyPartHelper, getBodyParts, getCount, getCreatePartByCID, getMarkSize, getMultiPart, getPartByCID, getPartHelperByCID, setMarkSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MimeWriter()
public MimeWriter(javax.mail.Multipart mp)
mp - | Method Detail |
|---|
public void setMIMEDetails(MimeUtil.MIMEDetails _md)
_md -
public InputStream getInputStream()
throws IOException,
javax.mail.MessagingException
IOException
javax.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 name
public void writeToDir(File directory)
throws javax.mail.MessagingException,
IOException
directory - the directory to use as '.' for writing the mime parts
javax.mail.MessagingException
IOException
javax.mail.MessagingException
public 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 unbuffered
IOException
javax.mail.MessagingException
public UrlPart writeToURL(String strUrl)
throws IOException,
javax.mail.MessagingException
strUrl - the URL to write to
HttpURLConnection the opened http connection, null in case of error or file
IOException
javax.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 t
public 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 files
public 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 to
IOException
javax.mail.MessagingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||