public class Content
extends java.lang.Object
implements java.io.Serializable
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 and Description |
---|
Content()
Default constructor for Content object.
|
Content(java.lang.String data)
Constructs a new Content object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCharset()
The character set of the content.
|
java.lang.String |
getData()
The textual data of the content.
|
int |
hashCode() |
void |
setCharset(java.lang.String charset)
The character set of the content.
|
void |
setData(java.lang.String data)
The textual data of the content.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Content |
withCharset(java.lang.String charset)
The character set of the content.
|
Content |
withData(java.lang.String data)
The textual data of the content.
|
public Content()
public Content(java.lang.String data)
data
- The textual data of the content.
public java.lang.String getData()
The textual data of the content.
The textual data of the content.
public void setData(java.lang.String data)
The textual data of the content.
data
- The textual data of the content.
public Content withData(java.lang.String data)
The textual data of the content.
Returns a reference to this object so that method calls can be chained together.
data
- The textual data of the content.
public java.lang.String getCharset()
The character set of the content.
The character set of the content.
public void setCharset(java.lang.String charset)
The character set of the content.
charset
- The character set of the content.
public Content withCharset(java.lang.String charset)
The character set of the content.
Returns a reference to this object so that method calls can be chained together.
charset
- The character set of the content.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.