public class

ByteArrayBody

extends AbstractContentBody
java.lang.Object
   ↳ org.apache.http.entity.mime.content.AbstractContentBody
     ↳ org.apache.http.entity.mime.content.ByteArrayBody

Class Overview

Body part that is built using a byte array containing a file.

Summary

Public Constructors
ByteArrayBody(byte[] data, String mimeType, String filename)
Creates a new ByteArrayBody.
ByteArrayBody(byte[] data, String filename)
Creates a new ByteArrayBody.
Public Methods
String getCharset()
long getContentLength()
String getFilename()
String getTransferEncoding()
void writeTo(OutputStream out)
[Expand]
Inherited Methods
From class org.apache.http.entity.mime.content.AbstractContentBody
From class java.lang.Object
From interface org.apache.http.entity.mime.content.ContentBody
From interface org.apache.http.entity.mime.content.ContentDescriptor

Public Constructors

public ByteArrayBody (byte[] data, String mimeType, String filename)

Creates a new ByteArrayBody.

Parameters
data The contents of the file contained in this part.
mimeType The mime type of the file contained in this part.
filename The name of the file contained in this part.

public ByteArrayBody (byte[] data, String filename)

Creates a new ByteArrayBody.

Parameters
data The contents of the file contained in this part.
filename The name of the file contained in this part.

Public Methods

public String getCharset ()

public long getContentLength ()

public String getFilename ()

public String getTransferEncoding ()

public void writeTo (OutputStream out)

Throws
IOException