Class Content
- java.lang.Object
-
- com.amazonaws.services.simpleemail.model.Content
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Content extends Object implements Serializable, Cloneable
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.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Content
clone()
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.
-
-
-
Constructor Detail
-
Content
public Content()
Default constructor for Content object. Callers should use the setter or fluent setter (with...) methods to initialize the 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
-
setData
public void setData(String data)
The textual data of the content.
- Parameters:
data
- The textual data of the content.
-
getData
public String getData()
The textual data of the content.
- Returns:
- The textual data of the content.
-
withData
public Content withData(String data)
The textual data of the content.
- Parameters:
data
- The textual data of the content.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCharset
public void setCharset(String charset)
The character set of the content.
- Parameters:
charset
- The character set of the content.
-
getCharset
public String getCharset()
The character set of the content.
- Returns:
- The character set of the content.
-
withCharset
public Content withCharset(String charset)
The character set of the content.
- Parameters:
charset
- The character set of the content.- 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()
-
-