接口 ContentHandler
- 所有已知实现类:
AbstractContentHandler
public interface ContentHandler
Description:
Title:首亨软件 - TSS/CRM等
- 从以下版本开始:
- Aug 16, 2012
-
方法概要
修饰符和类型方法说明voidbody(BodyDescriptor bd, InputStream is) Called when the body of a discrete (non-multipart) entity is about to be parsed.voidCalled when a body part ends.voidCalled when there are no more header fields in a message or body part.voidCalled when a message ends.voidCalled when the body of an entity has been parsed.voidepilogue(InputStream is) Called for the epilogue (whatever comes after the final body part) of amultipart/*entity.voidCalled for each field of a header.voidpreamble(InputStream is) Called for the preamble (whatever comes before the first body part) of amultipart/*entity.voidraw(InputStream is) Called when a new entity (message or body part) starts and the parser is inrawmode.voidCalled when a new body part starts inside amultipart/*entity.voidCalled when a header (of a message or body part) is about to be parsed.voidCalled when a new message starts (a top level message or an embedded rfc822 message).voidCalled when the body of a multipart entity is about to be parsed.
-
方法详细资料
-
startMessage
Called when a new message starts (a top level message or an embedded rfc822 message).- 抛出:
MimeException- on processing errors
-
endMessage
Called when a message ends.- 抛出:
MimeException- on processing errors
-
startBodyPart
Called when a new body part starts inside amultipart/*entity.- 抛出:
MimeException- on processing errors
-
endBodyPart
Called when a body part ends.- 抛出:
MimeException- on processing errors
-
startHeader
Called when a header (of a message or body part) is about to be parsed.- 抛出:
MimeException- on processing errors
-
field
Called for each field of a header.- 参数:
rawField- the MIME field.- 抛出:
MimeException- on processing errors
-
endHeader
Called when there are no more header fields in a message or body part.- 抛出:
MimeException- on processing errors
-
preamble
Called for the preamble (whatever comes before the first body part) of amultipart/*entity.- 参数:
is- used to get the contents of the preamble.- 抛出:
MimeException- on processing errorsIOException- should be thrown on I/O errors.
-
epilogue
Called for the epilogue (whatever comes after the final body part) of amultipart/*entity.- 参数:
is- used to get the contents of the epilogue.- 抛出:
MimeException- on processing errorsIOException- should be thrown on I/O errors.
-
startMultipart
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 theContent-TypeandContent-Transfer-Encodingheader fields.- 抛出:
MimeException- on processing errors
-
endMultipart
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- seestartMultipart(BodyDescriptor)is- the contents of the body. NOTE: this is the raw body contents - it will not be decoded if encoded. Thebdparameter should be used to determine how the stream data should be decoded.- 抛出:
MimeException- on processing errorsIOException- should be thrown on I/O errors.
-
raw
Called when a new entity (message or body part) starts and the parser is inrawmode.- 参数:
is- the raw contents of the entity.- 抛出:
MimeException- on processing errorsIOException- should be thrown on I/O errors.
-