public class TextEntity extends MimeEntity
| Modifier and Type | Class and Description |
|---|---|
class |
TextEntity.Consumer
Consumer to parse the body.
|
MimeEntity.Parser, MimeEntity.Transfer| Modifier and Type | Field and Description |
|---|---|
static String |
CHARSET_PARAMETER |
headers, parent| Constructor and Description |
|---|
TextEntity(MimeEntity parent,
MimeHeaders from)
From existing headers.
|
TextEntity(String text,
Charset charset,
String textMimeType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProduceBodyRange()
Return true if this entity is able to extract a range of the body.
|
net.lecousin.framework.concurrent.async.AsyncSupplier<net.lecousin.framework.util.Pair<Long,net.lecousin.framework.concurrent.util.AsyncProducer<ByteBuffer,IOException>>,IOException> |
createBodyProducer()
Create a producer of this entity's body.
|
net.lecousin.framework.util.Triple<net.lecousin.framework.math.RangeLong,Long,BinaryEntity> |
createBodyRange(net.lecousin.framework.math.RangeLong range)
Extract a range of this entity's body.
|
net.lecousin.framework.concurrent.util.AsyncConsumer<ByteBuffer,IOException> |
createConsumer(Long size)
Create a consumer of data to parse the body.
|
Charset |
getCharset() |
String |
getText() |
void |
setCharset(Charset charset)
Set the charset to encode the text.
|
void |
setText(String text) |
getHeaders, getParent, parse, writeEntitypublic static final String CHARSET_PARAMETER
public TextEntity(MimeEntity parent, MimeHeaders from) throws MimeException
MimeExceptionpublic String getText()
public void setText(String text)
public Charset getCharset()
public void setCharset(Charset charset) throws MimeException
MimeExceptionpublic net.lecousin.framework.concurrent.async.AsyncSupplier<net.lecousin.framework.util.Pair<Long,net.lecousin.framework.concurrent.util.AsyncProducer<ByteBuffer,IOException>>,IOException> createBodyProducer()
MimeEntitycreateBodyProducer in class MimeEntitypublic boolean canProduceBodyRange()
MimeEntitycanProduceBodyRange in class MimeEntitypublic net.lecousin.framework.util.Triple<net.lecousin.framework.math.RangeLong,Long,BinaryEntity> createBodyRange(net.lecousin.framework.math.RangeLong range)
MimeEntitycreateBodyRange in class MimeEntitypublic net.lecousin.framework.concurrent.util.AsyncConsumer<ByteBuffer,IOException> createConsumer(Long size)
MimeEntitycreateConsumer in class MimeEntitysize - size of data to consume if known, null if unknownCopyright © 2020. All rights reserved.