类 RawFieldParser

java.lang.Object
com.sh.mail.mime4j.stream.RawFieldParser

public class RawFieldParser extends Object

Description:

Title:首亨软件 - TSS/CRM等

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

  • 构造器详细资料

    • RawFieldParser

      public RawFieldParser()
  • 方法详细资料

    • INIT_BITSET

      public static BitSet INIT_BITSET(int... b)
    • parseField

      public RawField parseField(ByteSequence raw) throws MimeException
      Parses the sequence of bytes into RawField.
      参数:
      raw - ByteSequence
      返回:
      RawField
      抛出:
      MimeException - if the input data does not contain a valid MIME field.
    • parseRawBody

      public RawBody parseRawBody(RawField field)
      Parses the field body containing a value with parameters into RawBody.
      参数:
      field - unstructured (raw) field
      返回:
      RawBody
    • parseRawBody

      public RawBody parseRawBody(ByteSequence buf, ParserCursor cursor)
      Parses the sequence of bytes containing a value with parameters into RawBody.
      参数:
      buf - buffer with the sequence of bytes to be parsed
      cursor - defines the bounds and current position of the buffer
      返回:
      RawBody
    • parseParameters

      public List<NameValuePair> parseParameters(ByteSequence buf, ParserCursor cursor)
      Parses the sequence of bytes containing field parameters delimited with semicolon into a list of NameValuePairs.
      参数:
      buf - buffer with the sequence of bytes to be parsed
      cursor - defines the bounds and current position of the buffer
      返回:
      List
    • parseParameter

      public NameValuePair parseParameter(ByteSequence buf, ParserCursor cursor)
      Parses the sequence of bytes containing a field parameter delimited with semicolon into NameValuePair.
      参数:
      buf - buffer with the sequence of bytes to be parsed
      cursor - defines the bounds and current position of the buffer
      返回:
      NameValuePair
    • parseToken

      public String parseToken(ByteSequence buf, ParserCursor cursor, BitSet delimiters)
      Extracts from the sequence of bytes a token terminated with any of the given delimiters discarding semantically insignificant whitespace characters and comments.
      参数:
      buf - buffer with the sequence of bytes to be parsed
      cursor - defines the bounds and current position of the buffer
      delimiters - set of delimiting characters. Can be null if the token is not delimited by any character.
      返回:
      String
    • parseValue

      public String parseValue(ByteSequence buf, ParserCursor cursor, BitSet delimiters)
      Extracts from the sequence of bytes a value which can be enclosed in quote marks and terminated with any of the given delimiters discarding semantically insignificant whitespace characters and comments.
      参数:
      buf - buffer with the sequence of bytes to be parsed
      cursor - defines the bounds and current position of the buffer
      delimiters - set of delimiting characters. Can be null if the value is not delimited by any character.
      返回:
      String
    • skipWhiteSpace

      public void skipWhiteSpace(ByteSequence buf, ParserCursor cursor)
      Skips semantically insignificant whitespace characters and moves the cursor to the closest non-whitespace character.
      参数:
      buf - buffer with the sequence of bytes to be parsed
      cursor - defines the bounds and current position of the buffer
    • skipComment

      public void skipComment(ByteSequence buf, ParserCursor cursor)
      Skips semantically insignificant content if the current position is positioned at the beginning of a comment and moves the cursor past the end of the comment. Nested comments and escaped characters are recognized and handled appropriately.
      参数:
      buf - buffer with the sequence of bytes to be parsed
      cursor - defines the bounds and current position of the buffer
    • skipAllWhiteSpace

      public void skipAllWhiteSpace(ByteSequence buf, ParserCursor cursor)
      Skips semantically insignificant whitespace characters and comments and moves the cursor to the closest semantically significant non-whitespace character. Nested comments and escaped characters are recognized and handled appropriately.
      参数:
      buf - buffer with the sequence of bytes to be parsed
      cursor - defines the bounds and current position of the buffer
    • copyContent

      public void copyContent(ByteSequence buf, ParserCursor cursor, BitSet delimiters, StringBuilder dst)
      Transfers content into the destination buffer until a whitespace character, a comment, or any of the given delimiters is encountered.
      参数:
      buf - buffer with the sequence of bytes to be parsed
      cursor - defines the bounds and current position of the buffer
      delimiters - set of delimiting characters. Can be null if the value is delimited by a whitespace or a comment only.
      dst - destination buffer
    • copyQuotedContent

      public void copyQuotedContent(ByteSequence buf, ParserCursor cursor, StringBuilder dst)
      Transfers content enclosed with quote marks into the destination buffer.
      参数:
      buf - buffer with the sequence of bytes to be parsed
      cursor - defines the bounds and current position of the buffer
      dst - destination buffer