public class MultipartEntity extends MimeEntity
| Modifier and Type | Class and Description |
|---|---|
class |
MultipartEntity.BodyProducer
Producer of body data.
|
class |
MultipartEntity.Parser
Parser for multi-part content.
|
MimeEntity.Transfer| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
boundary |
static String |
MAIN_CONTENT_TYPE |
protected MimeEntityFactory |
partFactory |
protected LinkedList<MimeEntity> |
parts |
headers, parent| Constructor and Description |
|---|
MultipartEntity(byte[] boundary,
String subType)
Constructor.
|
MultipartEntity(MimeEntity parent,
MimeHeaders headers)
From existing headers.
|
MultipartEntity(String subType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(MimeEntity part)
Append a part.
|
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.
|
protected static byte[] |
generateBoundary() |
byte[] |
getBoundary() |
MimeEntityFactory |
getPartFactory() |
List<MimeEntity> |
getParts() |
<T extends MimeEntity> |
getPartsOfType(Class<T> type)
Return the parts compatible with the given type.
|
void |
setPartFactory(MimeEntityFactory partFactory) |
getHeaders, getParent, parse, writeEntitypublic static final String MAIN_CONTENT_TYPE
protected byte[] boundary
protected LinkedList<MimeEntity> parts
protected MimeEntityFactory partFactory
public MultipartEntity(byte[] boundary,
String subType)
public MultipartEntity(String subType)
public MultipartEntity(MimeEntity parent, MimeHeaders headers) throws MimeException
MimeExceptionpublic MimeEntityFactory getPartFactory()
public void setPartFactory(MimeEntityFactory partFactory)
protected static byte[] generateBoundary()
public byte[] getBoundary()
public void add(MimeEntity part)
public List<MimeEntity> getParts()
public <T extends MimeEntity> List<T> getPartsOfType(Class<T> type)
public 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.