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

📄 smsbindreceiver.java

📁 WAP PUSH后台源码,WAP PUSH后台源码
💻 JAVA
字号:
package com.tssx.ebiz.sgip;

import java.io.*;
/**
 * <p>类名: SMSBindReceiver</p>
 * <p>功能: 建立一个接受的通道</p>
 * <p>版权: Copyright (c) 2002</p>
 * <p>公司: 深讯信科</p>
 * <p>版本: 1.0</p>
 * @程序 xuke
 * @修改纪录
 */
public class SMSBindReceiver extends SMSData{
     private int loginType=2;
     private String loginName;
     private String loginPassword;
     private String reserve;

     public SMSBindReceiver(){
          super();
     }
     public int getLoginType() {
             return loginType;
     }
     public void setLoginType(int newLoginType) {
             loginType = newLoginType;
     }
     public String getLoginName() {
             return loginName;
     }
     public void setLoginName(String newLoginName) {
             loginName = newLoginName;
     }
     public String getLoginPassword() {
             return loginPassword;
     }
     public void setLoginPassword(String newLoginPassword) {
             loginPassword = newLoginPassword;
     }
     public String getReserve() {
             return reserve;
     }
     public void setReserve(String newReserve) {
             reserve = newReserve;
     }
     public synchronized void write(DataOutputStream m_os) throws IOException{
          int i=0;
          int j=0;
          this.messageLength=61;
          this.commandID=CommandID.SGIP_BIND;

          byte b[]=new byte[messageLength];

          /*head*/
          byte[] head1=getInteger4(messageLength);
          byte[] head2=getInteger4(commandID);
          byte[] head3=getInteger4(seqAddr);
          byte[] head4=getInteger4(seqDate);
          byte[] head5=getInteger4(sequence);

          /*body*/
          byte body1=getInteger1(loginType);
          byte[] body2=getText(16,loginName);
          byte[] body3=getText(16,loginPassword);
          byte[] body4=getText(8,reserve);
          i=0;
          j=0;
          while(j<head1.length){
               b[i]=head1[j];
               i++;
               j++;
          }
          j=0;
          while(j<head2.length){
               b[i]=head2[j];
               i++;
               j++;
          }
          j=0;
          while(j<head3.length){
               b[i]=head3[j];
               i++;
               j++;
          }
          j=0;
          while(j<head4.length){
               b[i]=head4[j];
               i++;
               j++;
          }
          j=0;
          while(j<head5.length){
               b[i]=head5[j];
               i++;
               j++;
          }
          b[i]=body1;
          i++;
          j=0;
          while(j<body2.length){
               b[i]=body2[j];
               i++;
               j++;
          }
          j=0;
          while(j<body3.length){
               b[i]=body3[j];
               i++;
               j++;
          }
          j=0;
          while(j<body4.length){
               b[i]=body4[j];
               i++;
               j++;
          }
          m_os.write(b);
     }

}

⌨️ 快捷键说明

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