MultipartEntityBuilder.@Deprecated public class HttpMultipart extends Object
| Constructor and Description |
|---|
HttpMultipart(String subType,
Charset charset,
String boundary)
Deprecated.
Creates an instance with the specified settings.
|
HttpMultipart(String subType,
Charset charset,
String boundary,
HttpMultipartMode mode)
Deprecated.
Creates an instance with the specified settings.
|
HttpMultipart(String subType,
String boundary)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBodyPart(FormBodyPart part)
Deprecated.
|
protected void |
formatMultipartHeader(FormBodyPart part,
OutputStream out)
Deprecated.
Write the multipart header fields; depends on the style.
|
List<FormBodyPart> |
getBodyParts()
Deprecated.
|
String |
getBoundary() |
Charset |
getCharset() |
HttpMultipartMode |
getMode()
Deprecated.
|
String |
getSubType() |
long |
getTotalLength()
Determines the total length of the multipart content (content length of
individual parts plus that of extra elements required to delimit the parts
from one another).
|
protected static void |
writeField(MinimalField field,
Charset charset,
OutputStream out) |
protected static void |
writeField(MinimalField field,
OutputStream out) |
void |
writeTo(OutputStream out)
Writes out the content in the multipart/form encoding.
|
protected final Charset charset
public HttpMultipart(String subType, Charset charset, String boundary, HttpMultipartMode mode)
subType - MIME subtype - must not be nullcharset - the character set to use. May be null,
in which case MIME.DEFAULT_CHARSET - i.e. US-ASCII - is used.boundary - to use - must not be nullmode - the mode to useIllegalArgumentException - if charset is null or boundary is nullpublic HttpMultipart(String subType, Charset charset, String boundary)
HttpMultipartMode.STRICTsubType - MIME subtype - must not be nullcharset - the character set to use. May be null,
in which case MIME.DEFAULT_CHARSET - i.e. US-ASCII - is used.boundary - to use - must not be nullIllegalArgumentException - if charset is null or boundary is nullpublic HttpMultipartMode getMode()
protected void formatMultipartHeader(FormBodyPart part, OutputStream out) throws IOException
IOExceptionpublic List<FormBodyPart> getBodyParts()
public void addBodyPart(FormBodyPart part)
protected static void writeField(MinimalField field, OutputStream out) throws IOException
IOExceptionprotected static void writeField(MinimalField field, Charset charset, OutputStream out) throws IOException
IOExceptionpublic String getSubType()
public Charset getCharset()
public String getBoundary()
public void writeTo(OutputStream out) throws IOException
IOExceptionpublic long getTotalLength()
-1
otherwise.Copyright © 1999–2014 The Apache Software Foundation. All rights reserved.