content
protected final byte[] content
Cloneable, HttpEntityUrlEncodedFormEntitypublic class StringEntity extends AbstractHttpEntity implements Cloneable
| Modifier and Type | Field | Description |
|---|---|---|
protected byte[] |
content |
chunked, contentEncoding, contentType| Constructor | Description |
|---|---|
StringEntity(String s) |
|
StringEntity(String s,
String charset) |
| Modifier and Type | Method | Description |
|---|---|---|
Object |
clone() |
Creates and returns a copy of this
Object. |
InputStream |
getContent() |
Creates a new InputStream object of the entity.
|
long |
getContentLength() |
Tells the length of the content, if known.
|
boolean |
isRepeatable() |
Tells if the entity is capable to produce its data more than once.
|
boolean |
isStreaming() |
Tells that this entity is not streaming.
|
void |
writeTo(OutputStream outstream) |
Writes the entity content to the output stream.
|
consumeContent, getContentEncoding, getContentType, isChunked, setChunked, setContentEncoding, setContentEncoding, setContentType, setContentTypeUnsupportedEncodingExceptionUnsupportedEncodingExceptionHttpEntityisRepeatable in interface HttpEntityHttpEntitygetContentLength in interface HttpEntityLong.MAX_VALUE,
a negative number is returned.HttpEntityrepeatable
will throw an exception if this method is called multiple times.getContent in interface HttpEntityIOException - if the stream could not be createdHttpEntitywriteTo in interface HttpEntityoutstream - the output stream to write entity content toIOException - if an I/O error occursisStreaming in interface HttpEntityfalseObjectObject. The default
implementation returns a so-called "shallow" copy: It creates a new
instance of the same class and then copies the field values (including
object references) from this instance to the new instance. A "deep" copy,
in contrast, would also recursively clone nested objects. A subclass that
needs to implement this kind of cloning should call super.clone()
to create the new instance and then create deep copies of the nested,
mutable objects.clone in class ObjectCloneNotSupportedException - if this object's class does not implement the
Cloneable interface.