public abstract class MimeEntity extends Object implements MimeHeadersContainer<MimeEntity>
| Modifier and Type | Class and Description |
|---|---|
static class |
MimeEntity.Parser
Parser of a MIME message.
|
static class |
MimeEntity.Transfer
Parser of MIME Entity, using TransferEncodingFactory.
|
| Modifier and Type | Field and Description |
|---|---|
protected MimeHeaders |
headers |
protected MimeEntity |
parent |
| Constructor and Description |
|---|
MimeEntity(MimeEntity parent)
Constructor.
|
MimeEntity(MimeEntity parent,
MimeHeaders headers)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
canProduceBodyRange()
Return true if this entity is able to extract a range of the body.
|
abstract 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.
|
abstract 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.
|
abstract net.lecousin.framework.concurrent.util.AsyncConsumer<ByteBuffer,IOException> |
createConsumer(Long size)
Create a consumer of data to parse the body.
|
MimeHeaders |
getHeaders()
Return the MIME headers.
|
MimeEntity |
getParent() |
static net.lecousin.framework.concurrent.async.AsyncSupplier<MimeEntity,IOException> |
parse(net.lecousin.framework.io.IO.Readable input,
MimeEntityFactory entityFactory)
Parse the given input as a MimeEntity.
|
net.lecousin.framework.concurrent.async.AsyncSupplier<net.lecousin.framework.io.IO.OutputToInput,IOException> |
writeEntity()
Write the headers and body of this entity into an OutputToInput.
|
protected MimeEntity parent
protected MimeHeaders headers
public MimeEntity(MimeEntity parent, MimeHeaders headers)
public MimeEntity(MimeEntity parent)
public MimeEntity getParent()
public MimeHeaders getHeaders()
MimeHeadersContainergetHeaders in interface MimeHeadersContainer<MimeEntity>public abstract net.lecousin.framework.concurrent.async.AsyncSupplier<net.lecousin.framework.util.Pair<Long,net.lecousin.framework.concurrent.util.AsyncProducer<ByteBuffer,IOException>>,IOException> createBodyProducer()
public abstract boolean canProduceBodyRange()
public abstract net.lecousin.framework.util.Triple<net.lecousin.framework.math.RangeLong,Long,BinaryEntity> createBodyRange(net.lecousin.framework.math.RangeLong range)
public net.lecousin.framework.concurrent.async.AsyncSupplier<net.lecousin.framework.io.IO.OutputToInput,IOException> writeEntity()
public abstract net.lecousin.framework.concurrent.util.AsyncConsumer<ByteBuffer,IOException> createConsumer(Long size)
size - size of data to consume if known, null if unknownpublic static net.lecousin.framework.concurrent.async.AsyncSupplier<MimeEntity,IOException> parse(net.lecousin.framework.io.IO.Readable input, MimeEntityFactory entityFactory)
Copyright © 2020. All rights reserved.