接口 ContentHandler

所有已知实现类:
AbstractContentHandler

public interface ContentHandler

Description:

Title:首亨软件 - TSS/CRM等

从以下版本开始:
Aug 16, 2012
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Called when the body of a discrete (non-multipart) entity is about to be parsed.
    void
    Called when a body part ends.
    void
    Called when there are no more header fields in a message or body part.
    void
    Called when a message ends.
    void
    Called when the body of an entity has been parsed.
    void
    Called for the epilogue (whatever comes after the final body part) of a multipart/* entity.
    void
    field(Field rawField)
    Called for each field of a header.
    void
    Called for the preamble (whatever comes before the first body part) of a multipart/* entity.
    void
    Called when a new entity (message or body part) starts and the parser is in raw mode.
    void
    Called when a new body part starts inside a multipart/* entity.
    void
    Called when a header (of a message or body part) is about to be parsed.
    void
    Called when a new message starts (a top level message or an embedded rfc822 message).
    void
    Called when the body of a multipart entity is about to be parsed.
  • 方法详细资料

    • startMessage

      void startMessage() throws MimeException
      Called when a new message starts (a top level message or an embedded rfc822 message).
      抛出:
      MimeException - on processing errors
    • endMessage

      void endMessage() throws MimeException
      Called when a message ends.
      抛出:
      MimeException - on processing errors
    • startBodyPart

      void startBodyPart() throws MimeException
      Called when a new body part starts inside a multipart/* entity.
      抛出:
      MimeException - on processing errors
    • endBodyPart

      void endBodyPart() throws MimeException
      Called when a body part ends.
      抛出:
      MimeException - on processing errors
    • startHeader

      void startHeader() throws MimeException
      Called when a header (of a message or body part) is about to be parsed.
      抛出:
      MimeException - on processing errors
    • field

      void field(Field rawField) throws MimeException
      Called for each field of a header.
      参数:
      rawField - the MIME field.
      抛出:
      MimeException - on processing errors
    • endHeader

      void endHeader() throws MimeException
      Called when there are no more header fields in a message or body part.
      抛出:
      MimeException - on processing errors
    • preamble

      void preamble(InputStream is) throws MimeException, IOException
      Called for the preamble (whatever comes before the first body part) of a multipart/* entity.
      参数:
      is - used to get the contents of the preamble.
      抛出:
      MimeException - on processing errors
      IOException - should be thrown on I/O errors.
    • epilogue

      void epilogue(InputStream is) throws MimeException, IOException
      Called for the epilogue (whatever comes after the final body part) of a multipart/* entity.
      参数:
      is - used to get the contents of the epilogue.
      抛出:
      MimeException - on processing errors
      IOException - should be thrown on I/O errors.
    • startMultipart

      void startMultipart(BodyDescriptor bd) throws MimeException
      Called when the body of a multipart entity is about to be parsed.
      参数:
      bd - encapsulates the values (either read from the message stream or, if not present, determined implictly as described in the MIME rfc:s) of the Content-Type and Content-Transfer-Encoding header fields.
      抛出:
      MimeException - on processing errors
    • endMultipart

      void endMultipart() throws MimeException
      Called when the body of an entity has been parsed.
      抛出:
      MimeException - on processing errors
    • body

      Called when the body of a discrete (non-multipart) entity is about to be parsed.
      参数:
      bd - see startMultipart(BodyDescriptor)
      is - the contents of the body. NOTE: this is the raw body contents - it will not be decoded if encoded. The bd parameter should be used to determine how the stream data should be decoded.
      抛出:
      MimeException - on processing errors
      IOException - should be thrown on I/O errors.
    • raw

      void raw(InputStream is) throws MimeException, IOException
      Called when a new entity (message or body part) starts and the parser is in raw mode.
      参数:
      is - the raw contents of the entity.
      抛出:
      MimeException - on processing errors
      IOException - should be thrown on I/O errors.