Package org.apache.http.entity.mime
Class MultipartEntity
- java.lang.Object
-
- org.apache.http.entity.mime.MultipartEntity
-
- All Implemented Interfaces:
org.apache.http.HttpEntity
@Deprecated public class MultipartEntity extends java.lang.Object implements org.apache.http.HttpEntity
Deprecated.4.3 UseMultipartEntityBuilder
.Multipart/form coded HTTP entity consisting of multiple body parts.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description MultipartEntity()
Deprecated.Creates an instance using modeHttpMultipartMode.STRICT
MultipartEntity(HttpMultipartMode mode)
Deprecated.Creates an instance using the specifiedHttpMultipartMode
mode.MultipartEntity(HttpMultipartMode mode, java.lang.String boundary, java.nio.charset.Charset charset)
Deprecated.Creates an instance using the specified parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addPart(java.lang.String name, ContentBody contentBody)
Deprecated.void
addPart(FormBodyPart bodyPart)
Deprecated.void
consumeContent()
Deprecated.protected java.lang.String
generateBoundary()
Deprecated.protected java.lang.String
generateContentType(java.lang.String boundary, java.nio.charset.Charset charset)
Deprecated.java.io.InputStream
getContent()
Deprecated.org.apache.http.Header
getContentEncoding()
Deprecated.long
getContentLength()
Deprecated.org.apache.http.Header
getContentType()
Deprecated.boolean
isChunked()
Deprecated.boolean
isRepeatable()
Deprecated.boolean
isStreaming()
Deprecated.void
writeTo(java.io.OutputStream outstream)
Deprecated.
-
-
-
Constructor Detail
-
MultipartEntity
public MultipartEntity(HttpMultipartMode mode, java.lang.String boundary, java.nio.charset.Charset charset)
Deprecated.Creates an instance using the specified parameters- Parameters:
mode
- the mode to use, may benull
, in which caseHttpMultipartMode.STRICT
is usedboundary
- the boundary string, may benull
, in which casegenerateBoundary()
is invoked to create the stringcharset
- the character set to use, may benull
, in which caseMIME.DEFAULT_CHARSET
- i.e. US-ASCII - is used.
-
MultipartEntity
public MultipartEntity(HttpMultipartMode mode)
Deprecated.Creates an instance using the specifiedHttpMultipartMode
mode. Boundary and charset are set tonull
.- Parameters:
mode
- the desired mode
-
MultipartEntity
public MultipartEntity()
Deprecated.Creates an instance using modeHttpMultipartMode.STRICT
-
-
Method Detail
-
generateContentType
protected java.lang.String generateContentType(java.lang.String boundary, java.nio.charset.Charset charset)
Deprecated.
-
generateBoundary
protected java.lang.String generateBoundary()
Deprecated.
-
addPart
public void addPart(FormBodyPart bodyPart)
Deprecated.
-
addPart
public void addPart(java.lang.String name, ContentBody contentBody)
Deprecated.
-
isRepeatable
public boolean isRepeatable()
Deprecated.- Specified by:
isRepeatable
in interfaceorg.apache.http.HttpEntity
-
isChunked
public boolean isChunked()
Deprecated.- Specified by:
isChunked
in interfaceorg.apache.http.HttpEntity
-
isStreaming
public boolean isStreaming()
Deprecated.- Specified by:
isStreaming
in interfaceorg.apache.http.HttpEntity
-
getContentLength
public long getContentLength()
Deprecated.- Specified by:
getContentLength
in interfaceorg.apache.http.HttpEntity
-
getContentType
public org.apache.http.Header getContentType()
Deprecated.- Specified by:
getContentType
in interfaceorg.apache.http.HttpEntity
-
getContentEncoding
public org.apache.http.Header getContentEncoding()
Deprecated.- Specified by:
getContentEncoding
in interfaceorg.apache.http.HttpEntity
-
consumeContent
public void consumeContent() throws java.io.IOException, java.lang.UnsupportedOperationException
Deprecated.- Specified by:
consumeContent
in interfaceorg.apache.http.HttpEntity
- Throws:
java.io.IOException
java.lang.UnsupportedOperationException
-
getContent
public java.io.InputStream getContent() throws java.io.IOException, java.lang.UnsupportedOperationException
Deprecated.- Specified by:
getContent
in interfaceorg.apache.http.HttpEntity
- Throws:
java.io.IOException
java.lang.UnsupportedOperationException
-
writeTo
public void writeTo(java.io.OutputStream outstream) throws java.io.IOException
Deprecated.- Specified by:
writeTo
in interfaceorg.apache.http.HttpEntity
- Throws:
java.io.IOException
-
-