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.HttpEntityDeprecated.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.STRICTMultipartEntity(HttpMultipartMode mode)Deprecated.Creates an instance using the specifiedHttpMultipartModemode.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 voidaddPart(java.lang.String name, ContentBody contentBody)Deprecated.voidaddPart(FormBodyPart bodyPart)Deprecated.voidconsumeContent()Deprecated.protected java.lang.StringgenerateBoundary()Deprecated.protected java.lang.StringgenerateContentType(java.lang.String boundary, java.nio.charset.Charset charset)Deprecated.java.io.InputStreamgetContent()Deprecated.org.apache.http.HeadergetContentEncoding()Deprecated.longgetContentLength()Deprecated.org.apache.http.HeadergetContentType()Deprecated.booleanisChunked()Deprecated.booleanisRepeatable()Deprecated.booleanisStreaming()Deprecated.voidwriteTo(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.STRICTis 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 specifiedHttpMultipartModemode. 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:
isRepeatablein interfaceorg.apache.http.HttpEntity
-
isChunked
public boolean isChunked()
Deprecated.- Specified by:
isChunkedin interfaceorg.apache.http.HttpEntity
-
isStreaming
public boolean isStreaming()
Deprecated.- Specified by:
isStreamingin interfaceorg.apache.http.HttpEntity
-
getContentLength
public long getContentLength()
Deprecated.- Specified by:
getContentLengthin interfaceorg.apache.http.HttpEntity
-
getContentType
public org.apache.http.Header getContentType()
Deprecated.- Specified by:
getContentTypein interfaceorg.apache.http.HttpEntity
-
getContentEncoding
public org.apache.http.Header getContentEncoding()
Deprecated.- Specified by:
getContentEncodingin interfaceorg.apache.http.HttpEntity
-
consumeContent
public void consumeContent() throws java.io.IOException, java.lang.UnsupportedOperationExceptionDeprecated.- Specified by:
consumeContentin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOExceptionjava.lang.UnsupportedOperationException
-
getContent
public java.io.InputStream getContent() throws java.io.IOException, java.lang.UnsupportedOperationExceptionDeprecated.- Specified by:
getContentin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOExceptionjava.lang.UnsupportedOperationException
-
writeTo
public void writeTo(java.io.OutputStream outStream) throws java.io.IOExceptionDeprecated.- Specified by:
writeToin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOException
-
-