MultipartEntityBuilder
.@Deprecated public class MultipartEntity extends Object implements HttpEntity
Constructor and Description |
---|
MultipartEntity()
Deprecated.
Creates an instance using mode
HttpMultipartMode.STRICT |
MultipartEntity(HttpMultipartMode mode)
Deprecated.
Creates an instance using the specified
HttpMultipartMode mode. |
MultipartEntity(HttpMultipartMode mode,
String boundary,
Charset charset)
Deprecated.
Creates an instance using the specified parameters
|
Modifier and Type | Method and Description |
---|---|
void |
addPart(FormBodyPart bodyPart)
Deprecated.
|
void |
addPart(String name,
ContentBody contentBody)
Deprecated.
|
void |
consumeContent()
Deprecated.
|
protected String |
generateBoundary()
Deprecated.
|
protected String |
generateContentType(String boundary,
Charset charset)
Deprecated.
|
InputStream |
getContent()
Deprecated.
|
Header |
getContentEncoding()
Deprecated.
|
long |
getContentLength()
Deprecated.
|
Header |
getContentType()
Deprecated.
|
boolean |
isChunked()
Deprecated.
|
boolean |
isRepeatable()
Deprecated.
|
boolean |
isStreaming()
Deprecated.
|
void |
writeTo(OutputStream outstream)
Deprecated.
|
public MultipartEntity(HttpMultipartMode mode, String boundary, Charset charset)
mode
- the mode to use, may be null
, in which case HttpMultipartMode.STRICT
is usedboundary
- the boundary string, may be null
, in which case generateBoundary()
is invoked to create the stringcharset
- the character set to use, may be null
, in which case MIME.DEFAULT_CHARSET
- i.e. US-ASCII - is used.public MultipartEntity(HttpMultipartMode mode)
HttpMultipartMode
mode.
Boundary and charset are set to null
.mode
- the desired modepublic MultipartEntity()
HttpMultipartMode.STRICT
protected String generateContentType(String boundary, Charset charset)
protected String generateBoundary()
public void addPart(FormBodyPart bodyPart)
public void addPart(String name, ContentBody contentBody)
public boolean isRepeatable()
isRepeatable
in interface HttpEntity
public boolean isChunked()
isChunked
in interface HttpEntity
public boolean isStreaming()
isStreaming
in interface HttpEntity
public long getContentLength()
getContentLength
in interface HttpEntity
public Header getContentType()
getContentType
in interface HttpEntity
public Header getContentEncoding()
getContentEncoding
in interface HttpEntity
public void consumeContent() throws IOException, UnsupportedOperationException
consumeContent
in interface HttpEntity
IOException
UnsupportedOperationException
public InputStream getContent() throws IOException, UnsupportedOperationException
getContent
in interface HttpEntity
IOException
UnsupportedOperationException
public void writeTo(OutputStream outstream) throws IOException
writeTo
in interface HttpEntity
IOException
Copyright © 1999–2013 The Apache Software Foundation. All rights reserved.