New file |
| | |
| | | package safeluck.drive.evaluation.platformMessage; |
| | | |
| | | import com.anyun.exam.lib.MyLog; |
| | | import com.anyun.im_lib.util.ByteUtil; |
| | | |
| | | public class StuInfoResp extends ServerProtocol { |
| | | |
| | | private int currPos = 0; |
| | | |
| | | private short result; |
| | | private String ID;//身份证号码 |
| | | private String name;//姓名 |
| | | private String url; |
| | | |
| | | public StuInfoResp(byte[] rspBytes) { |
| | | super(rspBytes); |
| | | } |
| | | |
| | | @Override |
| | | protected void parseMsgBody(byte[] msgbodyData) { |
| | | result = ByteUtil.getShort(ByteUtil.subArray(msgbodyData,currPos,1)); |
| | | currPos +=1; |
| | | MyLog.i(PlatFormConstant.TAG,"考试人员信息应答:"+result); |
| | | if (result == PlatFormConstant.STU_INFO_SUCC){ |
| | | ID = ByteUtil.getString(ByteUtil.subArray(msgbodyData,currPos,18)); |
| | | currPos+=18; |
| | | name = ByteUtil.getString(ByteUtil.subArray(msgbodyData,currPos,20)); |
| | | currPos+=20; |
| | | |
| | | url = ByteUtil.getString(ByteUtil.subArray(msgbodyData,currPos,msgBodyLength-currPos)); |
| | | |
| | | MyLog.i(PlatFormConstant.TAG,"身份证:"+ID); |
| | | MyLog.i(PlatFormConstant.TAG,"头像url:"+url); |
| | | MyLog.i(PlatFormConstant.TAG,"姓名:"+name); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |