public class TextEntity extends MimeEntity
CONNECTION, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LENGTH, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, TRANSFER_ENCODING| Modifier | Constructor and Description |
|---|---|
protected |
TextEntity(MimeMessage from) |
|
TextEntity(String text,
Charset charset,
String textMimeType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static net.lecousin.framework.concurrent.synch.AsyncWork<TextEntity,IOException> |
from(MimeMessage mime,
boolean fromReceived)
Parse the body of the given MimeMessage into a TextEntity.
|
net.lecousin.framework.io.IO.Readable |
getBodyToSend()
Return the body to send, previoulsy set by setBodyToSend.
|
Charset |
getCharset() |
String |
getText() |
void |
setCharset(Charset charset)
Set the charset to encode the text.
|
void |
setText(String text) |
addHeader, addHeader, addHeaderRaw, appendHeadersTo, appendHeadersTo, getBodyReceivedAsInput, getBodyReceivedAsOutput, getContentLength, getContentType, getContentTypeValue, getFirstHeader, getFirstHeaderLongValue, getFirstHeaderRawValue, getFirstHeaderValue, getHeaders, getHeaders, getHeadersValues, getLogger, getReadableStream, hasHeader, readHeader, removeHeaders, send, setBodyReceived, setBodyToSend, setContentLength, setHeader, setHeader, setHeaderRawprotected TextEntity(MimeMessage from) throws Exception
Exceptionpublic static net.lecousin.framework.concurrent.synch.AsyncWork<TextEntity,IOException> from(MimeMessage mime, boolean fromReceived)
fromReceived - if true, the received body is parsed, else the body to send is parsed from the mime message.public String getText()
public void setText(String text)
public Charset getCharset()
public void setCharset(Charset charset) throws Exception
Exceptionpublic net.lecousin.framework.io.IO.Readable getBodyToSend()
MimeMessagegetBodyToSend in class MimeMessageCopyright © 2018. All rights reserved.