phsloginrep.java

来自「JAVA实现的短信网关程序」· Java 代码 · 共 68 行

JAVA
68
字号
package sms.PHS;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class PHSLoginRep extends PHSResponse{    private static final int COMMAND_ID = 0x80000001;    private String authenticatorISMG;    private static final int lenAuthenticatorISMG = 16;    private static final int lenMessageBody = 21;    private static final int lenStatus = 4;    private static final int lenVersion = 1;    private int status;    private byte version;    public PHSLoginRep(PHSMessage msg)        throws PHSException{        setPacketOffset(msg.getPacketOffset());        setPacketBytes(msg.getPacketBytes());        setCommandId(msg.getCommandId());        setSequenceId(msg.getSequenceId());        setTotalLength(msg.getTotalLength());        status = getInteger();        authenticatorISMG = getString(16);        version = getByte();        if(getOffset() != getLength())            throw new PHSException("\u83B7\u53D6\u6570\u636E\u51FA\u9519 !");        else            return;    }    public PHSLoginRep(PHSIO cmppio)        throws PHSException{        super(cmppio);        status = getInteger();        authenticatorISMG = getString(16);        version = getByte();        if(getOffset() != getLength())            throw new PHSException("\u83B7\u53D6\u6570\u636E\u51FA\u9519 !");        else            return;    }    public String getAuthenticatorISMG(){        return authenticatorISMG;    }    public int getStatus(){        return status;    }    public byte getVersion(){        return version;    }}

⌨️ 快捷键说明

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