Package com.cloudinary.android.payload
Class ByteArrayPayload
java.lang.Object
com.cloudinary.android.payload.Payload<byte[]>
com.cloudinary.android.payload.ByteArrayPayload
public class ByteArrayPayload extends Payload<byte[]>
This class is used to handle uploading of images/videos as byte arrays
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringENCODING_CHARSET -
Constructor Summary
Constructors Constructor Description ByteArrayPayload()ByteArrayPayload(byte[] data) -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)longgetLength(android.content.Context context)Get the length of the resource in bytesinthashCode()java.lang.Objectprepare(android.content.Context context)Prepares the payload to upload to Cloudinaryjava.lang.StringtoUri()Constructs a uri of the data to upload, for serialization.
-
Field Details
-
ENCODING_CHARSET
public static final java.lang.String ENCODING_CHARSET- See Also:
- Constant Field Values
-
-
Constructor Details
-
ByteArrayPayload
public ByteArrayPayload(byte[] data) -
ByteArrayPayload
public ByteArrayPayload()
-
-
Method Details
-
toUri
public java.lang.String toUri()Description copied from class:PayloadConstructs a uri of the data to upload, for serialization. -
getLength
public long getLength(android.content.Context context)Description copied from class:PayloadGet the length of the resource in bytes -
prepare
Description copied from class:PayloadPrepares the payload to upload to Cloudinary- Specified by:
preparein classPayload<byte[]>- Parameters:
context- Android context- Returns:
- An object formatted for Cloudinary uploader. This can be one of InputStream, Byte array, File object or an absolute path (as string).
- Throws:
EmptyByteArrayException
-
equals
public boolean equals(java.lang.Object o) -
hashCode
public int hashCode()
-