packagecom.yidianling.im.session.extension;importcom.alibaba.fastjson.JSONObject;importcom.netease.nimlib.sdk.msg.attachment.MsgAttachment;/** * Created by zhoujianghua on 2015/4/9. */publicabstractclassCustomAttachmentimplementsMsgAttachment{protectedinttype;CustomAttachment(inttype){this.type=type;}publicvoidfromJson(JSONObjectdata){if(data!=null){parseData(data);}}@OverridepublicStringtoJson(booleansend){returnCustomAttachParser.packData(type,packData());}publicintgetType(){returntype;}protectedabstractvoidparseData(JSONObjectdata);protectedabstractJSONObjectpackData();}