public final class EmptyHttpRequestEntity extends java.lang.Object implements HttpRequestEntity
HttpRequestEntity. This entity doesn't have any ContentType.| Modifier and Type | Field and Description |
|---|---|
static HttpRequestEntity |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength()
Returns the length of the content or a negative number if it's not known.
|
ContentType |
contentType()
Returns the content type of the entity if known.
|
void |
writeContent(java.io.OutputStream out)
Writes the content to the given
OutputStream. |
public static final HttpRequestEntity INSTANCE
public ContentType contentType()
HttpRequestEntitycontentType in interface HttpRequestEntitynull if no content type is applicable (like when the entity is empty).public long contentLength()
throws java.io.IOException
HttpRequestEntitycontentLength in interface HttpRequestEntityjava.io.IOExceptionpublic void writeContent(java.io.OutputStream out)
throws java.io.IOException
HttpRequestEntityOutputStream. Note that the stream is property of the caller and must not be closed by this method.writeContent in interface HttpRequestEntityout - The OutputStream to write to.java.io.IOException