Package com.ning.http.client.multipart
Interface RequestEntity
public interface RequestEntity
This class is an adaptation of the Apache HttpClient implementation
-
Method Summary
Modifier and TypeMethodDescriptionlongGets the request entity's length.Gets the entity's content type.voidwriteRequest(OutputStream out) Writes the request entity to the given stream.
-
Method Details
-
writeRequest
Writes the request entity to the given stream.- Parameters:
out-- Throws:
IOException
-
getContentLength
long getContentLength()Gets the request entity's length. This method should return a non-negative value if the content length is known or a negative value if it is not. In the latter case the EntityEnclosingMethod will use chunk encoding to transmit the request entity.- Returns:
- a non-negative value when content length is known or a negative value when content length is not known
-
getContentType
String getContentType()Gets the entity's content type. This content type will be used as the value for the "Content-Type" header.- Returns:
- the entity's content type
-