|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.mail.internet.MimeUtility
public class MimeUtility
Field Summary | |
---|---|
static int |
ALL
|
Method Summary | |
---|---|
static java.io.InputStream |
decode(java.io.InputStream in,
java.lang.String encoding)
|
static java.lang.String |
decodeText(java.lang.String text)
Decode a string of text obtained from a mail header into it's proper form. |
static java.lang.String |
decodeWord(java.lang.String word)
Parse a string using the RFC 2047 rules for an "encoded-word" type. |
static java.io.OutputStream |
encode(java.io.OutputStream out,
java.lang.String encoding)
Wrap an encoder around a given output stream. |
static java.io.OutputStream |
encode(java.io.OutputStream out,
java.lang.String encoding,
java.lang.String filename)
Wrap an encoder around a given output stream. |
static java.lang.String |
encodeText(java.lang.String word)
|
static java.lang.String |
encodeText(java.lang.String word,
java.lang.String charset,
java.lang.String encoding)
|
static java.lang.String |
encodeWord(java.lang.String word)
|
static java.lang.String |
encodeWord(java.lang.String word,
java.lang.String charset,
java.lang.String encoding)
|
static java.lang.String |
fold(int used,
java.lang.String s)
Perform RFC 2047 text folding on a string of text. |
static java.lang.String |
getDefaultJavaCharset()
Get the default character set to use, in Java name format. |
static java.lang.String |
getEncoding(javax.activation.DataHandler handler)
Examine the content of a data source and decide what type of transfer encoding should be used. |
static java.lang.String |
getEncoding(javax.activation.DataSource source)
Determine the what transfer encoding should be used for data retrieved from a DataSource. |
static java.lang.String |
javaCharset(java.lang.String charset)
Translate a MIME standard character set name into the Java equivalent. |
static java.lang.String |
mimeCharset(java.lang.String charset)
Map a Java character set name into the MIME equivalent. |
static java.lang.String |
quote(java.lang.String word,
java.lang.String specials)
Quote a "word" value. |
static java.lang.String |
unfold(java.lang.String s)
Unfold a folded string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ALL
Method Detail |
---|
public static java.io.InputStream decode(java.io.InputStream in, java.lang.String encoding) throws MessagingException
MessagingException
public static java.lang.String decodeText(java.lang.String text) throws java.io.UnsupportedEncodingException
text
- The text to decode.
java.io.UnsupportedEncodingException
public static java.lang.String decodeWord(java.lang.String word) throws ParseException, java.io.UnsupportedEncodingException
word
- The possibly encoded word value.
ParseException
java.io.UnsupportedEncodingException
public static java.io.OutputStream encode(java.io.OutputStream out, java.lang.String encoding) throws MessagingException
out
- The output stream to wrap.encoding
- The name of the encoding.
MessagingException
public static java.io.OutputStream encode(java.io.OutputStream out, java.lang.String encoding, java.lang.String filename) throws MessagingException
out
- The output stream to wrap.encoding
- The name of the encoding.filename
- The filename of the data being sent (only used for UUEncode).
MessagingException
public static java.lang.String encodeText(java.lang.String word) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public static java.lang.String encodeText(java.lang.String word, java.lang.String charset, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public static java.lang.String encodeWord(java.lang.String word) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public static java.lang.String encodeWord(java.lang.String word, java.lang.String charset, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public static java.lang.String getEncoding(javax.activation.DataHandler handler)
handler
- The DataHandler associated with the content.
public static java.lang.String getEncoding(javax.activation.DataSource source)
source
- The DataSource for the transmitted data.
public static java.lang.String quote(java.lang.String word, java.lang.String specials)
word
- The word requiring quoting.specials
- The set of special characters that can't appear in an unquoted
string.
public static java.lang.String javaCharset(java.lang.String charset)
charset
- The MIME standard name.
public static java.lang.String mimeCharset(java.lang.String charset)
charset
- The java character set name.
public static java.lang.String getDefaultJavaCharset()
public static java.lang.String fold(int used, java.lang.String s)
used
- The amount of text already "used up" on this line. This is
typically the length of a message header that this text
get getting added to.s
- The text to fold.
public static java.lang.String unfold(java.lang.String s)
s
- The folded string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |