package com.xunao.effectdemo.net;

import com.google.gson.Gson;
import com.xunao.effectdemo.utils.StringUtil;

import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;


public class BaseBean implements Serializable {

    public static BaseBean parse(InputStream inputStream) throws IOException {
        String jsonStr = StringUtil.inputStream2String(inputStream, "utf-8");
        return parse(jsonStr);
    }

    public static BaseBean parse(String jsonStr) {
        Gson gson = new Gson();
        BaseBean baseBean = gson.fromJson(jsonStr, BaseBean.class);
        return baseBean;
    }

    private String error;
    private String retMsgJp;
    private String retMsgEn;

    public String getRetCode() {
        return error;
    }

    public void setRetCode(String retCode) {
        this.error = retCode;
    }

    public String getRetMsgJp() {
        return retMsgJp;
    }

    public void setRetMsgJp(String retMsgJp) {
        this.retMsgJp = retMsgJp;
    }

    public String getRetMsgEn() {
        return retMsgEn;
    }

    public void setRetMsgEn(String retMsgEn) {
        this.retMsgEn = retMsgEn;
    }
}
