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

📄 cmppquery.java

📁 JAVA做的短信平台
💻 JAVA
字号:
/*
 * 创建日期 2004-9-11
 *
 * 
 */
package com.ll.smsbeans.cmpp3;

import java.io.IOException;

/**
 * @author Administrator
 *
 * 
 */
public class CmppQuery extends CmppPacket
{
	
	public static int QUERY_TYPE_TOTAL =0;
	public static int QUERY_TYPE_OPERATION=1;
	
	
	private String Time; //8
	private int QueryType; //1
	private String QueryCode; //10
	private String Reserve; //8

	public CmppQuery(CmppQueryBuilder builder)
	{
		CommandId = CmppPacketCommon.ID_CMPP_QUERY;
		builder.CreateNextSequenceId(); 
		SequenceId = builder.getSequenceId();

		Time = builder.getTime(); //8
		QueryType = builder.getQueryType(); //1
		QueryCode = builder.getQueryCode(); //10
		Reserve = builder.getReserve(); //8	

	}

	public byte[] getContent() throws IOException
	{
		this.writeD(CommandId);
		this.writeD(SequenceId);

		this.writeS(Time, 8);
		this.writeC(QueryType);
		this.writeS(QueryCode, 10);
		this.writeS(Reserve, 8);
		return getBytes();
	}

	/* (非 Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString()
	{
		// TODO 自动生成方法存根

		return this.getClass().getName()
			+ ": SequenceId="
			+ SequenceId
			+ "\n  Time="
			+ Time
			+ "\n  QueryType="
			+ QueryType
			+ "\n  QueryCode="
			+ QueryCode
			+ "\n  Reserve="
			+ Reserve;
	}

	/**
	 * @return
	 */
	public String getQueryCode()
	{
		return QueryCode;
	}

	/**
	 * @return
	 */
	public int getQueryType()
	{
		return QueryType;
	}

	/**
	 * @return
	 */
	public String getReserve()
	{
		return Reserve;
	}

	/**
	 * @return
	 */
	public String getTime()
	{
		return Time;
	}

}

⌨️ 快捷键说明

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