Class RawMessage
- java.lang.Object
-
- com.amazonaws.services.simpleemail.model.RawMessage
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class RawMessage extends Object implements Serializable, Cloneable
Represents the raw data of the message.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RawMessage()
Default constructor for RawMessage object.RawMessage(ByteBuffer data)
Constructs a new RawMessage object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RawMessage
clone()
boolean
equals(Object obj)
ByteBuffer
getData()
The raw data of the message.int
hashCode()
void
setData(ByteBuffer data)
The raw data of the message.String
toString()
Returns a string representation of this object; useful for testing and debugging.RawMessage
withData(ByteBuffer data)
The raw data of the message.
-
-
-
Constructor Detail
-
RawMessage
public RawMessage()
Default constructor for RawMessage object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
RawMessage
public RawMessage(ByteBuffer data)
Constructs a new RawMessage object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
data
- The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).The To:, CC:, and BCC: headers in the raw message can contain a group list.
If you are using
SendRawEmail
with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation forSendRawEmail
.Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email. For more information, go to the Amazon SES Developer Guide.
-
-
Method Detail
-
setData
public void setData(ByteBuffer data)
The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).
The To:, CC:, and BCC: headers in the raw message can contain a group list.
If you are using
SendRawEmail
with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation forSendRawEmail
.Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email. For more information, go to the Amazon SES Developer Guide.
AWS SDK for Java performs a Base64 encoding on this field before sending this request to AWS service by default. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
- Parameters:
data
- The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).The To:, CC:, and BCC: headers in the raw message can contain a group list.
If you are using
SendRawEmail
with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation forSendRawEmail
.Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email. For more information, go to the Amazon SES Developer Guide.
-
getData
public ByteBuffer getData()
The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).
The To:, CC:, and BCC: headers in the raw message can contain a group list.
If you are using
SendRawEmail
with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation forSendRawEmail
.Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email. For more information, go to the Amazon SES Developer Guide.
ByteBuffer
s are stateful. Calling theirget
methods changes theirposition
. We recommend usingByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independentposition
, and callingget
methods on this rather than directly on the returnedByteBuffer
. Doing so will ensure that anyone else using theByteBuffer
will not be affected by changes to theposition
.- Returns:
- The raw data of the message. The client must ensure that the
message format complies with Internet email standards regarding
email header fields, MIME types, MIME encoding, and base64
encoding (if necessary).
The To:, CC:, and BCC: headers in the raw message can contain a group list.
If you are using
SendRawEmail
with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation forSendRawEmail
.Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email. For more information, go to the Amazon SES Developer Guide.
-
withData
public RawMessage withData(ByteBuffer data)
The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).
The To:, CC:, and BCC: headers in the raw message can contain a group list.
If you are using
SendRawEmail
with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation forSendRawEmail
.Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email. For more information, go to the Amazon SES Developer Guide.
- Parameters:
data
- The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).The To:, CC:, and BCC: headers in the raw message can contain a group list.
If you are using
SendRawEmail
with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation forSendRawEmail
.Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email. For more information, go to the Amazon SES Developer Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public RawMessage clone()
-
-