Skip to content

Most visited

Recently visited

navigation

ByteArrayEntity | Android Developers

to top
Android APIs
public class

ByteArrayEntity

extends AbstractHttpEntity
implements Cloneable
java.lang.Object
   ↳ org.apache.http.entity.AbstractHttpEntity
     ↳ org.apache.http.entity.ByteArrayEntity

Class Overview

An entity whose content is retrieved from a byte array.

Summary

Fields
protected final byte[] content
[Expand]
Inherited Fields
From class org.apache.http.entity.AbstractHttpEntity
Public Constructors
ByteArrayEntity(byte[] b)
Public Methods
Object clone()
Creates and returns a copy of this Object.
InputStream getContent()
long getContentLength()
boolean isRepeatable()
boolean isStreaming()
Tells that this entity is not streaming.
void writeTo(OutputStream outstream)
[Expand]
Inherited Methods
From class org.apache.http.entity.AbstractHttpEntity
From class java.lang.Object
From interface org.apache.http.HttpEntity

Fields

protected final byte[] content

Added in API level 1

Public Constructors

public ByteArrayEntity (byte[] b)

Added in API level 1

Public Methods

public Object clone ()

Added in API level 1

Creates and returns a copy of this Object. 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.

Returns
  • a copy of this object.

public InputStream getContent ()

Added in API level 1

public long getContentLength ()

Added in API level 1

public boolean isRepeatable ()

Added in API level 1

public boolean isStreaming ()

Added in API level 1

Tells that this entity is not streaming.

Returns
  • false

public void writeTo (OutputStream outstream)

Added in API level 1

Throws
IOException
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.