|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.mime4j.AbstractContentHandler
public abstract class AbstractContentHandler
Abstract ContentHandler with default implementations of all
the methods of the ContentHandler interface.
The default is to todo nothing.
| Constructor Summary | |
|---|---|
AbstractContentHandler()
|
|
| Method Summary | |
|---|---|
void |
body(BodyDescriptor bd,
java.io.InputStream is)
Called when the body of a discrete (non-multipart) entity is about to be parsed. |
void |
endBodyPart()
Called when a body part ends. |
void |
endHeader()
Called when there are no more header fields in a message or body part. |
void |
endMessage()
Called when a message ends. |
void |
endMultipart()
Called when the body of an entity has been parsed. |
void |
epilogue(java.io.InputStream is)
Called for the epilogue (whatever comes after the final body part) of a multipart/* entity. |
void |
field(java.lang.String fieldData)
Called for each field of a header. |
void |
preamble(java.io.InputStream is)
Called for the preamble (whatever comes before the first body part) of a multipart/* entity. |
void |
raw(java.io.InputStream is)
Called when a new entity (message or body part) starts and the parser is in raw mode. |
void |
startBodyPart()
Called when a new body part starts inside a multipart/* entity. |
void |
startHeader()
Called when a header (of a message or body part) is about to be parsed. |
void |
startMessage()
Called when a new message starts (a top level message or an embedded rfc822 message). |
void |
startMultipart(BodyDescriptor bd)
Called when the body of a multipart entity is about to be parsed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractContentHandler()
| Method Detail |
|---|
public void endMultipart()
ContentHandler
endMultipart in interface ContentHandlerContentHandler.endMultipart()public void startMultipart(BodyDescriptor bd)
ContentHandler
startMultipart in interface ContentHandlerbd - 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.ContentHandler.startMultipart(org.apache.james.mime4j.BodyDescriptor)
public void body(BodyDescriptor bd,
java.io.InputStream is)
throws java.io.IOException
ContentHandler
body in interface ContentHandlerbd - see ContentHandler.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.
java.io.IOException - should be thrown on I/O errors.ContentHandler.body(org.apache.james.mime4j.BodyDescriptor, java.io.InputStream)public void endBodyPart()
ContentHandler
endBodyPart in interface ContentHandlerContentHandler.endBodyPart()public void endHeader()
ContentHandler
endHeader in interface ContentHandlerContentHandler.endHeader()public void endMessage()
ContentHandler
endMessage in interface ContentHandlerContentHandler.endMessage()
public void epilogue(java.io.InputStream is)
throws java.io.IOException
ContentHandlermultipart/* entity.
epilogue in interface ContentHandleris - used to get the contents of the epilogue.
java.io.IOException - should be thrown on I/O errors.ContentHandler.epilogue(java.io.InputStream)public void field(java.lang.String fieldData)
ContentHandler
field in interface ContentHandlerfieldData - the raw contents of the field
(Field-Name: field value). The value will not be
unfolded.ContentHandler.field(java.lang.String)
public void preamble(java.io.InputStream is)
throws java.io.IOException
ContentHandlermultipart/* entity.
preamble in interface ContentHandleris - used to get the contents of the preamble.
java.io.IOException - should be thrown on I/O errors.ContentHandler.preamble(java.io.InputStream)public void startBodyPart()
ContentHandlermultipart/* entity.
startBodyPart in interface ContentHandlerContentHandler.startBodyPart()public void startHeader()
ContentHandler
startHeader in interface ContentHandlerContentHandler.startHeader()public void startMessage()
ContentHandler
startMessage in interface ContentHandlerContentHandler.startMessage()
public void raw(java.io.InputStream is)
throws java.io.IOException
ContentHandlerraw mode.
raw in interface ContentHandleris - the raw contents of the entity.
java.io.IOException - should be thrown on I/O errors.ContentHandler.raw(java.io.InputStream)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||