|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.internet.MimeUtility
public class MimeUtility
Field Summary | |
---|---|
static int |
ALL
|
Method Summary | |
---|---|
static InputStream |
decode(InputStream in,
String encoding)
|
static String |
decodeText(String text)
Decode a string of text obtained from a mail header into it's proper form. |
static String |
decodeWord(String word)
Parse a string using the RFC 2047 rules for an "encoded-word" type. |
static OutputStream |
encode(OutputStream out,
String encoding)
Wrap an encoder around a given output stream. |
static OutputStream |
encode(OutputStream out,
String encoding,
String filename)
Wrap an encoder around a given output stream. |
static String |
encodeText(String word)
|
static String |
encodeText(String word,
String charset,
String encoding)
|
static String |
encodeWord(String word)
|
static String |
encodeWord(String word,
String charset,
String encoding)
|
static String |
fold(int used,
String s)
Perform RFC 2047 text folding on a string of text. |
static String |
getDefaultJavaCharset()
Get the default character set to use, in Java name format. |
static String |
getEncoding(DataHandler handler)
Examine the content of a data source and decide what type of transfer encoding should be used. |
static String |
getEncoding(DataSource source)
Determine the what transfer encoding should be used for data retrieved from a DataSource. |
static String |
javaCharset(String charset)
Translate a MIME standard character set name into the Java equivalent. |
static String |
mimeCharset(String charset)
Map a Java character set name into the MIME equivalent. |
static String |
quote(String word,
String specials)
Quote a "word" value. |
static String |
unfold(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 InputStream decode(InputStream in, String encoding) throws MessagingException
MessagingException
public static String decodeText(String text) throws UnsupportedEncodingException
text
- The text to decode.
UnsupportedEncodingException
public static String decodeWord(String word) throws ParseException, UnsupportedEncodingException
word
- The possibly encoded word value.
ParseException
UnsupportedEncodingException
public static OutputStream encode(OutputStream out, String encoding) throws MessagingException
out
- The output stream to wrap.encoding
- The name of the encoding.
MessagingException
public static OutputStream encode(OutputStream out, String encoding, 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 String encodeText(String word) throws UnsupportedEncodingException
UnsupportedEncodingException
public static String encodeText(String word, String charset, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
public static String encodeWord(String word) throws UnsupportedEncodingException
UnsupportedEncodingException
public static String encodeWord(String word, String charset, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
public static String getEncoding(DataHandler handler)
handler
- The DataHandler associated with the content.
public static String getEncoding(DataSource source)
source
- The DataSource for the transmitted data.
public static String quote(String word, String specials)
word
- The word requiring quoting.specials
- The set of special characters that can't appear in an unquoted
string.
public static String javaCharset(String charset)
charset
- The MIME standard name.
public static String mimeCharset(String charset)
charset
- The java character set name.
public static String getDefaultJavaCharset()
public static String fold(int used, 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 String unfold(String s)
s
- The folded string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |