@NotThreadSafe public class BasicHttpEntityHC4 extends AbstractHttpEntityHC4
InputStream.chunked, contentEncoding, contentType, OUTPUT_BUFFER_SIZE| Constructor and Description |
|---|
BasicHttpEntityHC4()
Creates a new basic entity.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getContent()
Obtains the content, once only.
|
long |
getContentLength() |
boolean |
isRepeatable()
Tells that this entity is not repeatable.
|
boolean |
isStreaming() |
void |
setContent(java.io.InputStream instream)
Specifies the content.
|
void |
setContentLength(long len)
Specifies the length of the content.
|
void |
writeTo(java.io.OutputStream outstream) |
consumeContent, getContentEncoding, getContentType, isChunked, setChunked, setContentEncoding, setContentEncoding, setContentType, setContentTypepublic BasicHttpEntityHC4()
public long getContentLength()
public java.io.InputStream getContent()
throws java.lang.IllegalStateException
setContent has been calledjava.lang.IllegalStateException - if the content has not been providedpublic boolean isRepeatable()
falsepublic void setContentLength(long len)
len - the number of bytes in the content, or
a negative number to indicate an unknown lengthpublic void setContent(java.io.InputStream instream)
instream - the stream to return with the next call to
getContentpublic void writeTo(java.io.OutputStream outstream)
throws java.io.IOException
java.io.IOExceptionpublic boolean isStreaming()
Copyright © 1999-2015 The Apache Software Foundation. All rights reserved.