HttpEntity instances.
Several setter methods of this builder are mutually exclusive. In case of multiple invocations of the following methods only the last one will have effect:
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private boolean | |
| private String | |
| private ContentType | |
| private File | |
| private boolean | |
| private List | |
| private Serializable | |
| private InputStream | |
| private String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public HttpEntity | |
| public EntityBuilder | |
| private void | |
| public static EntityBuilder | |
| public byte[] | Returns: entity content as a byte array.Gets entity content as a byte array if set using
|
| public String | Returns: the content encoding of the entity, may be null.Gets the content encoding of the entity, may be null. |
| private ContentType | |
| public ContentType | Returns: theContentType of the entity, may be null.Gets the |
| public File | Returns: Gets the entity content as aFile.Gets the entity content as a |
| public List | Returns: entity content as a parameter list.Gets entity content as a parameter list if set using
|
| public Serializable | Returns: entity content as aSerializable.Gets entity content as a |
| public InputStream | Returns: entity content as anInputStreamGets entity content as an |
| public String | Returns: the entity content as a string, may be null.Gets the entity content as a string if set using |
| public EntityBuilder | |
| public boolean | Returns: true if entity is to be chunk coded, false otherwise.Tests if the entity is to be chunk coded ( |
| public boolean | Returns: true if entity is to be GZIP compressed, false otherwise.Tests if entities are to be GZIP compressed ( |
| public EntityBuilder | Returns: thisThe new entity content as a byte array. binary)Sets entity content as a byte array. |
| public EntityBuilder | Returns: thisthe content encoding of the entity, may be null. contentEncoding)Sets the content encoding of the entity. |
| public EntityBuilder | Returns: thisthe contentType)ContentType of the entity, may be null.Sets the |
| public EntityBuilder | |
| public EntityBuilder | Returns: thisentity content as a parameter list. parameters)Sets entity content as a parameter list. |
| public EntityBuilder | Returns: thisentity content as a parameter list. parameters)Sets entity content as a parameter list. |
| public EntityBuilder | Returns: thisentity content as a serializable)Serializable.Sets entity content as a |
| public EntityBuilder | Returns: thisThe new entity content as an InputStream. stream)Sets entity content as an |
| public EntityBuilder |
| binary | back to summary |
|---|---|
| private byte[] binary | |
| chunked | back to summary |
|---|---|
| private boolean chunked | |
| contentEncoding | back to summary |
|---|---|
| private String contentEncoding | |
| contentType | back to summary |
|---|---|
| private ContentType contentType | |
| file | back to summary |
|---|---|
| private File file | |
| gzipCompressed | back to summary |
|---|---|
| private boolean gzipCompressed | |
| parameters | back to summary |
|---|---|
| private List<NameValuePair> parameters | |
| serializable | back to summary |
|---|---|
| private Serializable serializable | |
| stream | back to summary |
|---|---|
| private InputStream stream | |
| text | back to summary |
|---|---|
| private String text | |
| EntityBuilder | back to summary |
|---|---|
| pack-priv EntityBuilder() | |
| build | back to summary |
|---|---|
| public HttpEntity build() Builds a new instance of
| |
| chunked | back to summary |
|---|---|
| public EntityBuilder chunked() Sets entities to be chunked.
| |
| clearContent | back to summary |
|---|---|
| private void clearContent() | |
| create | back to summary |
|---|---|
| public static EntityBuilder create() | |
| getBinary | back to summary |
|---|---|
| public byte[] getBinary() Gets entity content as a byte array if set using
| |
| getContentEncoding | back to summary |
|---|---|
| public String getContentEncoding() Gets the content encoding of the entity, may be null.
| |
| getContentOrDefault | back to summary |
|---|---|
| private ContentType getContentOrDefault(final ContentType def) | |
| getContentType | back to summary |
|---|---|
| public ContentType getContentType() Gets the
| |
| getFile | back to summary |
|---|---|
| public File getFile() Gets the entity content as a | |
| getParameters | back to summary |
|---|---|
| public List Gets entity content as a parameter list if set using
| |
| getSerializable | back to summary |
|---|---|
| public Serializable getSerializable() Gets entity content as a
| |
| getStream | back to summary |
|---|---|
| public InputStream getStream() Gets entity content as an
| |
| getText | back to summary |
|---|---|
| public String getText() Gets the entity content as a string if set using
| |
| gzipCompressed | back to summary |
|---|---|
| public EntityBuilder gzipCompressed() Sets entities to be GZIP compressed.
| |
| isChunked | back to summary |
|---|---|
| public boolean isChunked() Tests if the entity is to be chunk coded (
| |
| isGzipCompressed | back to summary |
|---|---|
| public boolean isGzipCompressed() Tests if entities are to be GZIP compressed (
| |
| setBinary | back to summary |
|---|---|
| public EntityBuilder setBinary(final byte[] binary) Sets entity content as a byte array. This method is mutually exclusive with
| |
| setContentEncoding | back to summary |
|---|---|
| public EntityBuilder setContentEncoding(final String contentEncoding) Sets the content encoding of the entity.
| |
| setContentType | back to summary |
|---|---|
| public EntityBuilder setContentType(final ContentType contentType) Sets the
| |
| setFile | back to summary |
|---|---|
| public EntityBuilder setFile(final File file) Sets entity content as a
| |
| setParameters | back to summary |
|---|---|
| public EntityBuilder setParameters(final List<NameValuePair> parameters) Sets entity content as a parameter list. This method is mutually exclusive with
| |
| setParameters | back to summary |
|---|---|
| public EntityBuilder setParameters(final NameValuePair... parameters) Sets entity content as a parameter list. This method is mutually exclusive with
| |
| setSerializable | back to summary |
|---|---|
| public EntityBuilder setSerializable(final Serializable serializable) Sets entity content as a
| |
| setStream | back to summary |
|---|---|
| public EntityBuilder setStream(final InputStream stream) Sets entity content as an
| |
| setText | back to summary |
|---|---|
| public EntityBuilder setText(final String text) Sets entity content as a string. This method is mutually exclusive with
| |