com.amazonaws.services.simpleemail.model
Class Content

java.lang.Object
  extended by com.amazonaws.services.simpleemail.model.Content

public class Content
extends Object

Represents textual data, plus an optional character set specification.

By default, the text must be 7-bit ASCII, due to the constraints of the SMTP protocol. If the text must contain any other characters, then you must also specify a character set. Examples include UTF-8, ISO-8859-1, and Shift_JIS.


Constructor Summary
Content()
          Default constructor for a new Content object.
Content(String data)
          Constructs a new Content object.
 
Method Summary
 boolean equals(Object obj)
           
 String getCharset()
          The character set of the content.
 String getData()
          The textual data of the content.
 int hashCode()
           
 void setCharset(String charset)
          The character set of the content.
 void setData(String data)
          The textual data of the content.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 Content withCharset(String charset)
          The character set of the content.
 Content withData(String data)
          The textual data of the content.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Content

public Content()
Default constructor for a new Content object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


Content

public Content(String data)
Constructs a new Content object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
data - The textual data of the content.
Method Detail

getData

public String getData()
The textual data of the content.

Returns:
The textual data of the content.

setData

public void setData(String data)
The textual data of the content.

Parameters:
data - The textual data of the content.

withData

public Content withData(String data)
The textual data of the content.

Returns a reference to this object so that method calls can be chained together.

Parameters:
data - The textual data of the content.
Returns:
A reference to this updated object so that method calls can be chained together.

getCharset

public String getCharset()
The character set of the content.

Returns:
The character set of the content.

setCharset

public void setCharset(String charset)
The character set of the content.

Parameters:
charset - The character set of the content.

withCharset

public Content withCharset(String charset)
The character set of the content.

Returns a reference to this object so that method calls can be chained together.

Parameters:
charset - The character set of the content.
Returns:
A reference to this updated 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 class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.