1 package com.netease.nimlib.sdk.chatroom.model;
3 import android.os.Parcel;
4 import android.os.Parcelable;
8 import org.json.JSONException;
9 import org.json.JSONObject;
11 import java.io.Serializable;
26 private String urlReqData;
29 private int failFinal;
31 public CdnRequestData(Map<String, CdnURLRequestData> reqData,
int failFinal) {
32 this.failFinal = failFinal;
33 if (reqData == null) {
36 JSONObject dataObj =
new JSONObject();
37 for (Map.Entry<String, CdnURLRequestData> entry : reqData.entrySet()) {
39 dataObj.put(entry.getKey(), entry.getValue());
40 }
catch (JSONException e) {
44 this.urlReqData = dataObj.toString();
56 urlReqData = in.readString();
57 failFinal = in.readInt();
60 public static final Creator<CdnRequestData>
CREATOR =
new Creator<CdnRequestData>() {
79 dest.writeString(urlReqData);
80 dest.writeInt(failFinal);
CdnRequestData(Parcel in)
void writeToParcel(Parcel dest, int flags)
CdnRequestData(Map< String, CdnURLRequestData > reqData, int failFinal)
static final Creator< CdnRequestData > CREATOR