Package com.sun.mail.dsn
Class DispositionNotification
- java.lang.Object
-
- com.sun.mail.dsn.Report
-
- com.sun.mail.dsn.DispositionNotification
-
-
Field Summary
Fields Modifier and Type Field Description protected InternetHeaders
notifications
The disposition notification content fields.
-
Constructor Summary
Constructors Constructor Description DispositionNotification()
Construct a disposition notification with no content.DispositionNotification(java.io.InputStream is)
Construct a disposition notification by parsing the supplied input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InternetHeaders
getNotifications()
Return all the disposition notification fields in the disposition notification.void
setNotifications(InternetHeaders notifications)
Set the disposition notification fields in the disposition notification.java.lang.String
toString()
void
writeTo(java.io.OutputStream os)
-
-
-
Field Detail
-
notifications
protected InternetHeaders notifications
The disposition notification content fields.
-
-
Constructor Detail
-
DispositionNotification
public DispositionNotification() throws MessagingException
Construct a disposition notification with no content.- Throws:
MessagingException
- for failures
-
DispositionNotification
public DispositionNotification(java.io.InputStream is) throws MessagingException, java.io.IOException
Construct a disposition notification by parsing the supplied input stream.- Parameters:
is
- the input stream- Throws:
java.io.IOException
- for I/O errors reading the streamMessagingException
- for other failures
-
-
Method Detail
-
getNotifications
public InternetHeaders getNotifications()
Return all the disposition notification fields in the disposition notification. The fields are defined as:disposition-notification-content = [ reporting-ua-field CRLF ] [ mdn-gateway-field CRLF ] [ original-recipient-field CRLF ] final-recipient-field CRLF [ original-message-id-field CRLF ] disposition-field CRLF *( failure-field CRLF ) *( error-field CRLF ) *( warning-field CRLF ) *( extension-field CRLF )
- Returns:
- the DSN fields
-
setNotifications
public void setNotifications(InternetHeaders notifications)
Set the disposition notification fields in the disposition notification.- Parameters:
notifications
- the DSN fields
-
writeTo
public void writeTo(java.io.OutputStream os) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-