Package de.xima.fc.http.params
Class BinaryData
- java.lang.Object
 - 
- de.xima.fc.http.params.BinaryData
 
 
- 
public final class BinaryData extends Object
Binary data that can be added to a HTTP request.- Since:
 - 7.0.3
 - Author:
 - XIMA MEDIA GmbH
 
 
- 
- 
Constructor Summary
Constructors Constructor Description BinaryData(String name, byte[] data, String filename, String mimeType)Creates a new binary data item.BinaryData(String name, byte[] data, String filename, String mimeType, Charset charset)Creates a new binary data item. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharsetgetCharset()org.apache.http.entity.ContentTypegetContentType()byte[]getData()StringgetFilename()StringgetMimeType()StringgetName() 
 - 
 
- 
- 
Constructor Detail
- 
BinaryData
public BinaryData(@Nonnull String name, @Nonnull byte[] data, @Nonnull String filename, @Nonnull String mimeType)Creates a new binary data item. Uses the default charset.- Parameters:
 name- The name of the binary data item when sending the request.data- The binary data to be sent with the request.filename- The original file name to be used when sending the binary data item.mimeType- The mime type of the data.
 
- 
BinaryData
public BinaryData(@Nonnull String name, @Nonnull byte[] data, @Nonnull String filename, @Nonnull String mimeType, @Nullable Charset charset)Creates a new binary data item. Uses the default charset.- Parameters:
 name- The name of the binary data item when sending the request.data- The binary data to be sent with the request.filename- The original file name to be used when sending the binary data item.mimeType- The mime type of the data.charset- The charset for the mime type.
 
 - 
 
- 
Method Detail
- 
getCharset
public Charset getCharset()
- Returns:
 - The charset for the mime type.
 
 
- 
getContentType
public org.apache.http.entity.ContentType getContentType()
- Returns:
 - The content type of the data, combines the mime type and the charset.
 
 
- 
getData
public byte[] getData()
- Returns:
 - The binary data to be sent with the request.
 
 
- 
getFilename
public String getFilename()
- Returns:
 - The original file name to be used when sending the binary data item.
 
 
- 
getMimeType
public String getMimeType()
- Returns:
 - The mime type of the data.
 
 
- 
getName
public String getName()
- Returns:
 - The name of the binary data item when sending the request.
 
 
 - 
 
 -