?? msgaddring.java
字號:
/**
*
*/
package com.aceway.vas.sjcraw.cbgp201;
import java.nio.ByteBuffer;
import com.aceway.vas.sjcraw.cbgp201.common.DataFormat;
import com.aceway.vas.sjcraw.cbgp201.common.MsgInfo;
/**
* @標題: 華為彩鈴平臺接口規范
* @說明:
* @版權: Copyright(c) 2007
* @公司: 北京漢銘信通科技有限公司
* @部門: 增值業務部
* @作者: 武達
* @Jun 5, 2007
*/
public class MsgAddRing extends Msg {
private static int operCode = MsgInfo.CRBT_ADD_RING;
private static int lenBody = MsgInfo.LEN_CRBT_ADD_RING;
/*
AccountID 21 String 用戶終端號碼
RingID 12 String 鈴音ID
Price 4 Integer 鈴音價格
*/
private String accountId;
private String ringId;
private int price;
public String getAccountId() {
return this.accountId;
}
public int getPrice() {
return this.price;
}
public String getRingId() {
return this.ringId;
}
public MsgAddRing(String seqNo, String linkId, String accountId, String ringId, int price){
this.accountId = DataFormat.makeString(accountId, 21);
this.ringId = DataFormat.makeString(ringId, 12);
this.price = price;
super.setCommandLength(lenBody);
super.setMsgHead(operCode, "0", seqNo, linkId);
ByteBuffer buff = ByteBuffer.allocate(lenBody);
buff.put(this.accountId.getBytes());
buff.put(this.ringId.getBytes());
buff.putInt(price);
buff.flip();
super.setMsgBody(buff.array());
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -