public class MultipartRelatedOutput extends MultipartOutput
MultipartOutput
:
MultipartRelatedDataOutput mrdo = new MultipartRelatedDataOutput();
mrdo.addPart(...);
The first added part will be used as root. The root parts content-type will
be used as the type parameter of the content-type of the mime message.
For parts without Content-ID header a unique id will be generated during
serialization.boundary, parts
Constructor and Description |
---|
MultipartRelatedOutput() |
Modifier and Type | Method and Description |
---|---|
OutputPart |
addPart(Object entity,
MediaType mediaType,
String contentId,
String contentTransferEncoding)
Used to add parts to the multipart output message.
|
OutputPart |
getRootPart()
The part that will be used as the root.
|
String |
getStartInfo()
Returns the start-info parameter of the Content-Type.
|
void |
setStartInfo(String startInfo)
Sets the start-info parameter of the Content-Type.
|
addPart, addPart, addPart, addPart, addPart, addPart, getBoundary, getParts, setBoundary
public OutputPart getRootPart()
public OutputPart addPart(Object entity, MediaType mediaType, String contentId, String contentTransferEncoding)
entity
- the object representing the part's bodymediaType
- the Content-Type of the partcontentId
- the Content-ID to be used as identification for the current
part, optional, if null one will be generatedcontentTransferEncoding
- The value to be used for the Content-Transfer-Encoding header
field of the part. It's optional, if you don't want to set
this pass null. Example values are: "7bit",
"quoted-printable", "base64", "8bit", "binary"public String getStartInfo()
public void setStartInfo(String startInfo)
Copyright © 2017 JBoss by Red Hat. All rights reserved.