public class Multipart
extends java.lang.Object
Constructor and Description |
---|
Multipart()
Construct a Multipart
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBoundary(java.util.Map<java.lang.String,Datum> parts)
Get a multipart boundary by analysing the parts.
|
void |
outputMultipartContent(java.util.Map<java.lang.String,Datum> partDatums,
java.lang.String boundary,
java.io.OutputStream outputStream)
Output multipart content
|
public void outputMultipartContent(java.util.Map<java.lang.String,Datum> partDatums, java.lang.String boundary, java.io.OutputStream outputStream) throws java.lang.Exception
partDatums
- the data to include in the response, supplied as
a String-Datum map. For each entry, a part will be generated with
the same name as the entry, and with content whose type is
application/octet-stream if the datum is a Binary datum, and
text/plain with utf8 encoding otherwise.boundary
- the multipart boundaryoutputStream
- the output stream to which the content is to
be written.java.lang.Exception
public java.lang.String getBoundary(java.util.Map<java.lang.String,Datum> parts) throws java.lang.Exception
parts
- the parts to be analysedjava.lang.Exception