public class Mime4JHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Mime4JHelper.SizedStream |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
M_ALTERNATIVE |
static java.lang.String |
M_ENCRYPTED |
static java.lang.String |
M_MIXED |
static java.lang.String |
M_RELATED |
static java.lang.String |
M_RELATIVE |
static java.lang.String |
M_SIGNED |
static java.lang.String |
TEXT_CALENDAR |
static java.lang.String |
TEXT_HTML |
static java.lang.String |
TEXT_PLAIN |
Constructor and Description |
---|
Mime4JHelper() |
Modifier and Type | Method and Description |
---|---|
static Mime4JHelper.SizedStream |
asSizedStream(org.apache.james.mime4j.dom.Message msg)
Serialize to a stream AND dispose the given message.
|
static java.io.InputStream |
asStream(org.apache.james.mime4j.dom.Message msg)
Serialize to a stream AND dispose the given message.
|
static java.util.List<AddressableEntity> |
expandParts(java.util.List<org.apache.james.mime4j.dom.Entity> parts) |
static java.util.List<AddressableEntity> |
expandTree(java.util.List<org.apache.james.mime4j.dom.Entity> parts)
This one will NOT chose only one between multipart/alternative parts
|
static long |
getPartLength(AddressableEntity ae) |
static boolean |
isAttachment(org.apache.james.mime4j.dom.Entity e) |
static org.apache.james.mime4j.dom.Message |
makeUtf8Compatible(java.io.InputStream in)
Parses the given mime stream and rewrites parts encoding to quoted-printable
& base64.
|
static org.apache.james.mime4j.dom.Message |
parse(byte[] messageData) |
static org.apache.james.mime4j.dom.Message |
parse(java.io.InputStream in) |
static org.apache.james.mime4j.dom.Message |
parse(java.io.InputStream in,
org.apache.james.mime4j.message.BodyFactory bf) |
static org.apache.james.mime4j.parser.MimeStreamParser |
parser() |
static void |
serialize(org.apache.james.mime4j.dom.Message toDump,
java.io.OutputStream out) |
static void |
serializeBody(org.apache.james.mime4j.dom.Body toDump,
java.io.OutputStream out) |
static org.apache.james.mime4j.dom.Message |
stripAttachments(org.apache.james.mime4j.dom.Message mm)
Returns a copy of the message without its binary parts
|
static IMailRewriter |
untouched(org.apache.james.mime4j.dom.address.Mailbox from) |
public static final java.lang.String M_ALTERNATIVE
public static final java.lang.String M_SIGNED
public static final java.lang.String M_ENCRYPTED
public static final java.lang.String M_MIXED
public static final java.lang.String M_RELATED
public static final java.lang.String M_RELATIVE
public static final java.lang.String TEXT_PLAIN
public static final java.lang.String TEXT_CALENDAR
public static final java.lang.String TEXT_HTML
public static java.util.List<AddressableEntity> expandParts(java.util.List<org.apache.james.mime4j.dom.Entity> parts)
public static long getPartLength(AddressableEntity ae) throws java.io.IOException
java.io.IOException
public static org.apache.james.mime4j.dom.Message stripAttachments(org.apache.james.mime4j.dom.Message mm)
mm
- public static IMailRewriter untouched(org.apache.james.mime4j.dom.address.Mailbox from)
public static org.apache.james.mime4j.dom.Message makeUtf8Compatible(java.io.InputStream in)
in
- public static void serializeBody(org.apache.james.mime4j.dom.Body toDump, java.io.OutputStream out)
public static void serialize(org.apache.james.mime4j.dom.Message toDump, java.io.OutputStream out)
public static org.apache.james.mime4j.dom.Message parse(byte[] messageData)
public static org.apache.james.mime4j.dom.Message parse(java.io.InputStream in)
public static org.apache.james.mime4j.dom.Message parse(java.io.InputStream in, org.apache.james.mime4j.message.BodyFactory bf)
public static org.apache.james.mime4j.parser.MimeStreamParser parser()
public static boolean isAttachment(org.apache.james.mime4j.dom.Entity e)
public static Mime4JHelper.SizedStream asSizedStream(org.apache.james.mime4j.dom.Message msg) throws java.io.IOException
msg
- java.io.IOException
public static java.io.InputStream asStream(org.apache.james.mime4j.dom.Message msg) throws java.io.IOException
msg
- java.io.IOException
public static java.util.List<AddressableEntity> expandTree(java.util.List<org.apache.james.mime4j.dom.Entity> parts)
parts
- Copyright © 2021. All Rights Reserved.