public interface

RequestEntity

com.ning.http.multipart.RequestEntity
Known Indirect Subclasses

Class Overview

This class is an adaptation of the Apache HttpClient implementationhttp://hc.apache.org/httpclient-3.x/

Summary

Public Methods
abstract long getContentLength()
Gets the request entity's length.
abstract String getContentType()
Gets the entity's content type.
abstract boolean isRepeatable()
Tests if writeRequest(java.io.OutputStream) can be called more than once.
abstract void writeRequest(OutputStream out)
Writes the request entity to the given stream.

Public Methods

public abstract 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

public abstract 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

public abstract boolean isRepeatable ()

Tests if writeRequest(java.io.OutputStream) can be called more than once.

Returns
  • true if the entity can be written to java.io.OutputStream more than once, false otherwise.

public abstract void writeRequest (OutputStream out)

Writes the request entity to the given stream.

Throws
IOException