Save This Page
Home » commons-httpclient-3.1-src » org.apache.commons » httpclient » methods » [javadoc | source]
org.apache.commons.httpclient.methods
public class: InputStreamRequestEntity [javadoc | source]
java.lang.Object
   org.apache.commons.httpclient.methods.InputStreamRequestEntity

All Implemented Interfaces:
    RequestEntity

A RequestEntity that contains an InputStream.
Field Summary
public static final  int CONTENT_LENGTH_AUTO    The content length will be calculated automatically. This implies buffering of the content. 
Constructor:
 public InputStreamRequestEntity(InputStream content) 
    Creates a new InputStreamRequestEntity with the given content and a content type of #CONTENT_LENGTH_AUTO .
    Parameters:
    content - The content to set.
 public InputStreamRequestEntity(InputStream content,
    String contentType) 
    Creates a new InputStreamRequestEntity with the given content, content type, and a content length of #CONTENT_LENGTH_AUTO .
    Parameters:
    content - The content to set.
    contentType - The type of the content, or null.
 public InputStreamRequestEntity(InputStream content,
    long contentLength) 
    Creates a new InputStreamRequestEntity with the given content and content length.
    Parameters:
    content - The content to set.
    contentLength - The content size in bytes or a negative number if not known. If #CONTENT_LENGTH_AUTO is given the content will be buffered in order to determine its size when #getContentLength() is called.
 public InputStreamRequestEntity(InputStream content,
    long contentLength,
    String contentType) 
    Creates a new InputStreamRequestEntity with the given content, content length, and content type.
    Parameters:
    content - The content to set.
    contentLength - The content size in bytes or a negative number if not known. If #CONTENT_LENGTH_AUTO is given the content will be buffered in order to determine its size when #getContentLength() is called.
    contentType - The type of the content, or null.
Method from org.apache.commons.httpclient.methods.InputStreamRequestEntity Summary:
getContent,   getContentLength,   getContentType,   isRepeatable,   writeRequest
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.httpclient.methods.InputStreamRequestEntity Detail:
 public InputStream getContent() 
 public long getContentLength() 
    Gets the content length. If the content length has not been set, the content will be buffered to determine the actual content length.
 public String getContentType() 
 public boolean isRepeatable() 
    Tests if this method is repeatable. Only true if the content has been buffered.
 public  void writeRequest(OutputStream out) throws IOException