org.apache.http.entity.mime
Class MultipartEntity

java.lang.Object
  extended by org.apache.http.entity.mime.MultipartEntity
All Implemented Interfaces:
org.apache.http.HttpEntity

Deprecated. 4.3 Use MultipartEntityBuilder.

@Deprecated
public class MultipartEntity
extends Object
implements org.apache.http.HttpEntity

Multipart/form coded HTTP entity consisting of multiple body parts.

Since:
4.0

Constructor Summary
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
 
Method Summary
 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.  
 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(OutputStream outStream)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartEntity

public MultipartEntity(HttpMultipartMode mode,
                       String boundary,
                       Charset charset)
Deprecated. 
Creates an instance using the specified parameters

Parameters:
mode - the mode to use, may be null, in which case HttpMultipartMode.STRICT is used
boundary - the boundary string, may be null, in which case generateBoundary() is invoked to create the string
charset - the character set to use, may be null, in which case MIME.DEFAULT_CHARSET - i.e. US-ASCII - is used.

MultipartEntity

public MultipartEntity(HttpMultipartMode mode)
Deprecated. 
Creates an instance using the specified HttpMultipartMode mode. Boundary and charset are set to null.

Parameters:
mode - the desired mode

MultipartEntity

public MultipartEntity()
Deprecated. 
Creates an instance using mode HttpMultipartMode.STRICT

Method Detail

generateContentType

protected String generateContentType(String boundary,
                                     Charset charset)
Deprecated. 

generateBoundary

protected String generateBoundary()
Deprecated. 

addPart

public void addPart(FormBodyPart bodyPart)
Deprecated. 

addPart

public void addPart(String name,
                    ContentBody contentBody)
Deprecated. 

isRepeatable

public boolean isRepeatable()
Deprecated. 
Specified by:
isRepeatable in interface org.apache.http.HttpEntity

isChunked

public boolean isChunked()
Deprecated. 
Specified by:
isChunked in interface org.apache.http.HttpEntity

isStreaming

public boolean isStreaming()
Deprecated. 
Specified by:
isStreaming in interface org.apache.http.HttpEntity

getContentLength

public long getContentLength()
Deprecated. 
Specified by:
getContentLength in interface org.apache.http.HttpEntity

getContentType

public org.apache.http.Header getContentType()
Deprecated. 
Specified by:
getContentType in interface org.apache.http.HttpEntity

getContentEncoding

public org.apache.http.Header getContentEncoding()
Deprecated. 
Specified by:
getContentEncoding in interface org.apache.http.HttpEntity

consumeContent

public void consumeContent()
                    throws IOException,
                           UnsupportedOperationException
Deprecated. 
Specified by:
consumeContent in interface org.apache.http.HttpEntity
Throws:
IOException
UnsupportedOperationException

getContent

public InputStream getContent()
                       throws IOException,
                              UnsupportedOperationException
Deprecated. 
Specified by:
getContent in interface org.apache.http.HttpEntity
Throws:
IOException
UnsupportedOperationException

writeTo

public void writeTo(OutputStream outStream)
             throws IOException
Deprecated. 
Specified by:
writeTo in interface org.apache.http.HttpEntity
Throws:
IOException


Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.