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

📄 cancelresp.java

📁 移动CMPP2.0 Java SDK
💻 JAVA
字号:

package cmpp.v2_0;

import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;

public class CancelResp extends CMPP
{
    private  final int commandId 		= CMPP.ID_CMPP_CANCEL_RESP;
    private	 final int commandLength 	= 1;
    
    private	int SuccessId	= 0;

	public CancelResp()   {
        super(CMPP.ID_CMPP_CANCEL_RESP);
    }
    public CancelResp(CMPP cmpp)  {
        super(cmpp);
    }  
    
	/**
	 * 
	 */
	protected int parseBody() {
		
    	if( super.bodyLength < commandLength ) {	//length too short.
    		return -1;
    	}
    	
    	byte[] abyte0 = new byte[21];
    	int off = 0;

    	Arrays.fill(abyte0,(byte)0);
    	CMPP.BytesCopy(super.bodybytes, abyte0, off, off, 0);
    	SuccessId = CMPP.ByteToInt(abyte0[0]);
    	off += 1;
    	
        return 0;
    }

	/**
	 * 
	 */
	protected int makeBody() {
	
    	// make bodybytes
    	super.bodyLength = commandLength; 
    	super.bodybytes  = new byte[super.bodyLength];
    	Arrays.fill(super.bodybytes,(byte)0);

    	// make body
    	int off = 0;
    	super.bodybytes[off] = CMPP.IntToByte(SuccessId);
    	off += 1;

    	return 0;
	}
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		
		sb.append("SuccessId=" + SuccessId + "\n");
		
		return sb.toString();
	}
	public int getSuccessId() {
		return SuccessId;
	}
	public void setSuccessId(int successId) {
		SuccessId = successId;
	}

}

⌨️ 快捷键说明

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