类 ContentUtil

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

public class ContentUtil extends Object

Description:

Title:首亨软件 - TSS/CRM等

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

    • encode

      public static ByteSequence encode(String string)
      Encodes the specified string into an immutable sequence of bytes using the US-ASCII charset.
      参数:
      string - string to encode.
      返回:
      encoded string as an immutable sequence of bytes.
    • encode

      public static ByteSequence encode(Charset charset, String string)
      Encodes the specified string into an immutable sequence of bytes using the specified charset.
      参数:
      charset - Java charset to be used for the conversion.
      string - string to encode.
      返回:
      encoded string as an immutable sequence of bytes.
    • decode

      public static String decode(ByteSequence byteSequence)
      Decodes the specified sequence of bytes into a string using the US-ASCII charset.
      参数:
      byteSequence - sequence of bytes to decode.
      返回:
      decoded string.
    • decode

      public static String decode(Charset charset, ByteSequence byteSequence)
      Decodes the specified sequence of bytes into a string using the specified charset.
      参数:
      charset - Java charset to be used for the conversion.
      byteSequence - sequence of bytes to decode.
      返回:
      decoded string.
    • decode

      public static String decode(ByteSequence byteSequence, int offset, int length)
      Decodes a sub-sequence of the specified sequence of bytes into a string using the US-ASCII charset.
      参数:
      byteSequence - sequence of bytes to decode.
      offset - offset into the byte sequence.
      length - number of bytes.
      返回:
      decoded string.
    • decode

      public static String decode(Charset charset, ByteSequence byteSequence, int offset, int length)
      Decodes a sub-sequence of the specified sequence of bytes into a string using the specified charset.
      参数:
      charset - Java charset to be used for the conversion.
      byteSequence - sequence of bytes to decode.
      offset - offset into the byte sequence.
      length - number of bytes.
      返回:
      decoded string.