org.apache.axis.attachments
Class MimeUtils
java.lang.Object
org.apache.axis.attachments.MimeUtils
public class MimeUtils
extends java.lang.Object
This class is defines utilities for mime.
static String[] | filter - Field filter
|
protected static Log | log - Field log
|
static javax.mail.internet.MimeMultipart | createMP(String env, java.util.Collection parts, int sendType) - This routine will create a multipart object from the parts and the SOAP content.
|
static long | getContentLength(javax.mail.Multipart mp) - Determine as efficiently as possible the content length for attachments in a mail Multipart.
|
protected static long | getContentLength(javax.mail.internet.MimeBodyPart bp) - Determine the length for the individual part.
|
static String | getContentType(javax.mail.internet.MimeMultipart mp) - This routine will get the content type from a mulit-part mime message.
|
static void | writeToMultiPartStream(java.io.OutputStream os, javax.mail.internet.MimeMultipart mp) - This routine will the multi part type and write it out to a stream.
|
filter
public static String[] filter
Field filter
log
protected static Log log
Field log
createMP
public static javax.mail.internet.MimeMultipart createMP(String env,
java.util.Collection parts,
int sendType)
throws AxisFault
This routine will create a multipart object from the parts and the SOAP content.
env
- should be the text for the main root part.parts
- contain a collection of the message parts.
- a new MimeMultipart object
getContentLength
public static long getContentLength(javax.mail.Multipart mp)
throws javax.mail.MessagingException,
java.io.IOException
Determine as efficiently as possible the content length for attachments in a mail Multipart.
mp
- is the multipart to be serarched.
getContentLength
protected static long getContentLength(javax.mail.internet.MimeBodyPart bp)
Determine the length for the individual part.
bp
- is the part to be searched.
getContentType
public static String getContentType(javax.mail.internet.MimeMultipart mp)
This routine will get the content type from a mulit-part mime message.
writeToMultiPartStream
public static void writeToMultiPartStream(java.io.OutputStream os,
javax.mail.internet.MimeMultipart mp)
This routine will the multi part type and write it out to a stream.
Note that is does *NOT* pass
AxisProperties
to
javax.mail.Session.getInstance
, but instead
the System properties.
os
- is the output stream to write to.mp
- the multipart that needs to be written to the stream.
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.