Name

MimeUtility

Synopsis

A utility class for various MIME-related activities, including encoding text into mail-safe forms and converting between Java character set (charset) names and MIME charsets. Most programmers use this class to meet the RFC-822 requirement that mail headers be pure ASCII.

public class MimeUtility {
// No Constructor
                  // Public Constants
   public static final int ALL;                                  // =-1
                  // Public Class Methods
   public static java.io.InputStream decode(
        java.io.InputStream is, 
        String encoding) throws MessagingException;  
   public static String decodeText(
        String etext) throws UnsupportedEncodingException;  
   public static String decodeWord(
        String eword) throws javax.mail.internet.ParseExceptionUnsupportedEncodingException;  
   public static java.io.OutputStream encode(
        java.io.OutputStream os, 
        String encoding) throws MessagingException;  
   public static java.io.OutputStream encode(                    // 1.2
        java.io.OutputStream os, String encoding, 
        String filename) throws MessagingException;  
   public static String encodeText(
        String text) throws UnsupportedEncodingException;  
   public static String encodeText(String text, 
        String charset, 
        String encoding) throws UnsupportedEncodingException;  
   public static String encodeWord(
        String word) throws UnsupportedEncodingException;  
   public static String encodeWord(String word, 
        String charset, 
        String encoding) throws UnsupportedEncodingException;  
   public static String getDefaultJavaCharset();  
   public static String getEncoding(                             // 1.2
        javax.activation.DataHandler dh); public ...

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.