public class MultipartRequestEntity extends Object implements RequestEntity
Modifier and Type | Field and Description |
---|---|
protected List<Part> |
parts
The MIME parts as set by the constructor
|
Constructor and Description |
---|
MultipartRequestEntity(List<Part> parts,
FluentCaseInsensitiveStringsMap requestHeaders)
Creates a new multipart entity containing the given parts.
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
generateMultipartBoundary()
Generates a random multipart boundary string.
|
long |
getContentLength()
Gets the request entity's length.
|
String |
getContentType()
Gets the entity's content type.
|
byte[] |
getMultipartBoundary()
Returns the MIME boundary string that is used to demarcate boundaries of this part.
|
void |
writeRequest(OutputStream out)
Writes the request entity to the given stream.
|
public MultipartRequestEntity(List<Part> parts, FluentCaseInsensitiveStringsMap requestHeaders)
parts
- The parts to include.public static byte[] generateMultipartBoundary()
public byte[] getMultipartBoundary()
public void writeRequest(OutputStream out) throws IOException
RequestEntity
writeRequest
in interface RequestEntity
IOException
public long getContentLength()
RequestEntity
getContentLength
in interface RequestEntity
public String getContentType()
RequestEntity
getContentType
in interface RequestEntity
Copyright © 2015. All Rights Reserved.