类 MimeUtil

java.lang.Object
com.sh.mail.mime4j.util.MimeUtil

public final class MimeUtil extends Object

Description:

Title:首亨软件 - TSS/CRM等

从以下版本开始:
Aug 16, 2012
  • 字段详细资料

    • ENC_QUOTED_PRINTABLE

      public static final String ENC_QUOTED_PRINTABLE
      The quoted-printable encoding.
      另请参阅:
    • ENC_BINARY

      public static final String ENC_BINARY
      The binary encoding.
      另请参阅:
    • ENC_BASE64

      public static final String ENC_BASE64
      The base64 encoding.
      另请参阅:
    • ENC_8BIT

      public static final String ENC_8BIT
      The 8bit encoding.
      另请参阅:
    • ENC_7BIT

      public static final String ENC_7BIT
      The 7bit encoding.
      另请参阅:
  • 方法详细资料

    • isSameMimeType

      public static boolean isSameMimeType(String pType1, String pType2)
    • isMessage

      public static boolean isMessage(String pMimeType)
    • isMultipart

      public static boolean isMultipart(String pMimeType)
    • isBase64Encoding

      public static boolean isBase64Encoding(String pTransferEncoding)
    • isQuotedPrintableEncoded

      public static boolean isQuotedPrintableEncoded(String pTransferEncoding)
    • createUniqueBoundary

      public static String createUniqueBoundary()
    • createUniqueMessageId

      public static String createUniqueMessageId(String hostName)
      Creates a new unique message identifier that can be used in message header field such as Message-ID or In-Reply-To. If the given host name is not null it will be used as suffix for the message ID (following an at sign). The resulting string is enclosed in angle brackets (< and >);
      参数:
      hostName - host name to be included in the message ID or null if no host name should be included.
      返回:
      a new unique message identifier.
    • formatDate

      public static String formatDate(Date date, TimeZone zone)
      Formats the specified date into a RFC 822 date-time string.
      参数:
      date - date to be formatted into a string.
      zone - the time zone to use or null to use the default time zone.
      返回:
      the formatted time string.
    • fold

      public static String fold(String s, int usedCharacters)
      Splits the specified string into a multiple-line representation with lines no longer than 76 characters (because the line might contain encoded words; see RFC 2047 section 2). If the string contains non-whitespace sequences longer than 76 characters a line break is inserted at the whitespace character following the sequence resulting in a line longer than 76 characters.
      参数:
      s - string to split.
      usedCharacters - number of characters already used up. Usually the number of characters for header field name plus colon and one space.
      返回:
      a multiple-line representation of the given string.
    • unfold

      public static String unfold(String s)
      Unfold a multiple-line representation into a single line.
      参数:
      s - string to unfold.
      返回:
      unfolded string.