public class MultipartEntity extends MimeEntity
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
boundary |
protected LinkedList<MimeMessage> |
parts |
CONNECTION, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LENGTH, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, TRANSFER_ENCODING| Modifier | Constructor and Description |
|---|---|
|
MultipartEntity(byte[] boundary,
String subType)
Constructor.
|
protected |
MultipartEntity(MimeMessage mime) |
|
MultipartEntity(String subType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(MimeMessage part)
Append a part.
|
protected net.lecousin.framework.concurrent.synch.AsyncWork<MimeMessage,IOException> |
createPart(List<MimeHeader> headers,
net.lecousin.framework.io.buffering.IOInMemoryOrFile body,
boolean asReceived) |
static net.lecousin.framework.concurrent.synch.AsyncWork<MultipartEntity,Exception> |
from(MimeMessage mime,
boolean fromReceived)
Parse the body of the given MimeMessage into a MultipartEntity.
|
protected static byte[] |
generateBoundary() |
net.lecousin.framework.io.IO.Readable |
getBodyToSend()
Return the body to send, previoulsy set by setBodyToSend.
|
byte[] |
getBoundary() |
List<MimeMessage> |
getParts() |
<T extends MimeMessage> |
getPartsOfType(Class<T> type)
Return the parts compatible with the given type.
|
net.lecousin.framework.concurrent.synch.SynchronizationPoint<IOException> |
parse(net.lecousin.framework.io.IO.Readable content,
boolean asReceived)
Parse the given content.
|
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 byte[] boundary
protected LinkedList<MimeMessage> parts
public MultipartEntity(byte[] boundary,
String subType)
public MultipartEntity(String subType)
protected MultipartEntity(MimeMessage mime) throws Exception
Exceptionpublic static net.lecousin.framework.concurrent.synch.AsyncWork<MultipartEntity,Exception> from(MimeMessage mime, boolean fromReceived)
fromReceived - if true, the received body is parsed, else the body to send is parsed from the mime message.protected static byte[] generateBoundary()
public byte[] getBoundary()
public void add(MimeMessage part)
public List<MimeMessage> getParts()
public <T extends MimeMessage> List<T> getPartsOfType(Class<T> type)
public net.lecousin.framework.io.IO.Readable getBodyToSend()
MimeMessagegetBodyToSend in class MimeMessagepublic net.lecousin.framework.concurrent.synch.SynchronizationPoint<IOException> parse(net.lecousin.framework.io.IO.Readable content, boolean asReceived)
asReceived - if true the received body is filled, else the body to send is filledprotected net.lecousin.framework.concurrent.synch.AsyncWork<MimeMessage,IOException> createPart(List<MimeHeader> headers, net.lecousin.framework.io.buffering.IOInMemoryOrFile body, boolean asReceived)
Copyright © 2018. All rights reserved.