public final class PaymentMethodIcon
extends java.lang.Object
implements java.io.Serializable, android.os.Parcelable
We fetch the icon data from the remote server. To display and to cache the data we need a data container. This class is able to store all the relevant image data.
We store the data as base64 since we are going to use it as base64 string and to avoid multiple times encoding the data we directly store it as base64.
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<PaymentMethodIcon> |
CREATOR |
| Modifier | Constructor and Description |
|---|---|
protected |
PaymentMethodIcon(android.os.Parcel in) |
|
PaymentMethodIcon(java.lang.String url,
java.lang.String base64Data,
java.lang.String mimeType)
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
java.lang.String |
getBase64Data() |
java.lang.String |
getMimeType() |
java.lang.String |
getUrl()
We want to cache the icon.
|
void |
writeToParcel(android.os.Parcel parcel,
int i) |
public static final android.os.Parcelable.Creator<PaymentMethodIcon> CREATOR
public PaymentMethodIcon(java.lang.String url,
java.lang.String base64Data,
java.lang.String mimeType)
url - the URL from where the image has been downloaded from. We use it to
identify the image. It acts as the icon's identifier.base64Data - the binary image data as base64 encoded string.mimeType - the mime type indicates what kind of image the icon is. Example: image/png,
image/svg+xmlprotected PaymentMethodIcon(android.os.Parcel in)
public void writeToParcel(android.os.Parcel parcel,
int i)
writeToParcel in interface android.os.Parcelablepublic java.lang.String getMimeType()
public java.lang.String getBase64Data()
public java.lang.String getUrl()
public int describeContents()
describeContents in interface android.os.Parcelable