⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msgqueryuserinforsp.java

📁 同步接收web services请求
💻 JAVA
字号:
/**
 * 
 */
package com.aceway.vas.sjcraw.cbgp201.cum;

import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;

import com.aceway.vas.sjcraw.cbgp201.Msg;
import com.aceway.vas.sjcraw.cbgp201.common.DataFormat;
import com.aceway.vas.sjcraw.cbgp201.common.MsgInfo;

/**
 * @标题: 华为彩铃平台接口规范
 * @说明: 
 * @版权: Copyright(c) 2007 
 * @公司: 北京汉铭信通科技有限公司 
 * @部门: 增值业务部 
 * @作者: 武达
 * @Jun 5, 2007
 */
public class MsgQueryUserInfoRsp extends Msg {

	/*
必选参数	Password	8	String	用户业务密码
可选参数	UserType	2	Integer	用户等级
	OpenType	1	Integer	用户开户来源

	 */
	private String password;
	private int userType;
	private int openType;

	public int getOpenType() {
    	return this.openType;
    }

	public String getPassword() {
    	return this.password;
    }

	public int getUserType() {
    	return this.userType;
    }

	/**
	 * @param bytes
	 */
	public MsgQueryUserInfoRsp(byte[] bytes) {
		super(bytes);
		ByteBuffer buff = super.getBodyBuffer();
		try {
	        this.password = new String(buff.array(), 0, 8, "gbk");
	        int len = bytes.length-MsgInfo.LEN_HEAD;
	        if (11==len){
	        	byte b = buff.get(10);
	        	this.openType = DataFormat.bytes2int(new byte[]{0, 0, 0, b});
	        	byte b1 = buff.get(8);
	        	b = buff.get(9);
	        	this.userType = DataFormat.bytes2int(new byte[]{0,0,b1, b});
	        }else if (10==len){
	        	byte b1 = buff.get(8);
	        	byte b = buff.get(9);
	        	this.userType = DataFormat.bytes2int(new byte[]{0,0,0, b});
	        }
        } catch (UnsupportedEncodingException e) {
	        // TODO Auto-generated catch block
	        e.printStackTrace();
        }
		
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -