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

public class MultipartEntity
extends java.lang.Object
implements org.apache.http.HttpEntity

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

Author:
Oleg Kalnichevski

Constructor Summary
MultipartEntity()
           
MultipartEntity(HttpMultipartMode mode)
           
MultipartEntity(HttpMultipartMode mode, java.lang.String boundary, java.nio.charset.Charset charset)
           
 
Method Summary
 void addPart(java.lang.String name, ContentBody contentBody)
           
 void consumeContent()
           
protected  java.lang.String generateContentType(java.lang.String boundary, java.nio.charset.Charset charset)
           
 java.io.InputStream getContent()
           
 org.apache.http.Header getContentEncoding()
           
 long getContentLength()
           
 org.apache.http.Header getContentType()
           
 boolean isChunked()
           
 boolean isRepeatable()
           
 boolean isStreaming()
           
 void writeTo(java.io.OutputStream outstream)
           
 
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,
                       java.lang.String boundary,
                       java.nio.charset.Charset charset)

MultipartEntity

public MultipartEntity(HttpMultipartMode mode)

MultipartEntity

public MultipartEntity()
Method Detail

generateContentType

protected java.lang.String generateContentType(java.lang.String boundary,
                                               java.nio.charset.Charset charset)

addPart

public void addPart(java.lang.String name,
                    ContentBody contentBody)

isRepeatable

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

isChunked

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

isStreaming

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

getContentLength

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

getContentType

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

getContentEncoding

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

consumeContent

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

getContent

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

writeTo

public void writeTo(java.io.OutputStream outstream)
             throws java.io.IOException
Specified by:
writeTo in interface org.apache.http.HttpEntity
Throws:
java.io.IOException


Copyright © 1999-2008 Apache Software Foundation. All Rights Reserved.