亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? smpppacket.java

?? Java寫的smpp實現
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
	flags.priority  = (this.priority == 0) ? false : true;	flags.registered = this.registered;	flags.replace_if_present = this.replaceIfPresent;	flags.esm_class = this.esmClass;	flags.protocol = this.protocolID;	flags.data_coding = this.dataCoding;	flags.default_msg = this.defaultMsg;	return (flags);    }    /** Check is the message registered.      * @see ie.omk.smpp.message.MsgFlags      */    public boolean isRegistered()    {	return (this.registered);    }    /** Check is the message submitted as priority.      * @see ie.omk.smpp.message.MsgFlags      */    public boolean isPriority()    {	return ((this.priority == 0) ? false : true);    }    /** Check if the message should be replaced if it is already present.      * @see ie.omk.smpp.message.MsgFlags      */    public boolean isReplaceIfPresent()    {	return (this.replaceIfPresent);    }    /** Get the ESM class of the message.      * @see ie.omk.smpp.message.MsgFlags      */    public int getEsmClass()    {	return (this.esmClass);    }    /** Get the GSM protocol Id of the message.      * @see ie.omk.smpp.message.MsgFlags      * @deprecated getProtocolID      */    public int getProtocolId()    {	return (this.protocolID);    }    /** Get the GSM protocol ID of the message.      * @see ie.omk.smpp.message.MsgFlags      */    public int getProtocolID()    {	return (this.protocolID);    }    /** Get the data coding.      * @see ie.omk.smpp.message.MsgFlags      */    public int getDataCoding()    {	return (this.dataCoding);    }    /** Get the default message to use.      * @see ie.omk.smpp.message.MsgFlags      */    public int getDefaultMsgId()    {	return (this.defaultMsg);    }    /** Set the text of the message (max 160 characters).      * This method sets the message text encoded using the default alphabet (as      * returned by AlphabetFactory.getDefaultAlphabet).  The maximum length of      * the string is 160 octets. Calling this method sets the data_coding value      * using AlphabetEncoding.getDataCoding.      * @param text The short message text.      * @exception ie.omk.smpp.StringTooLongException if the message is too      * long.      * @see ie.omk.smpp.util.AlphabetEncoding      * @see ie.omk.smpp.util.AlphabetEncoding#getDataCoding      * @see ie.omk.smpp.util.AlphabetFactory      * @see ie.omk.smpp.util.DefaultAlphabetEncoding      */    public void setMessageText(String text)	throws ie.omk.smpp.SMPPException    {	this.setMessageText(text, this.alphabet);    }    /** Set the text of the message (max 160 characters).      * This method sets the message text encoded using the SMS alphabet      * <i>alphabet</i>. The AlphabetEncoding.getDataCoding value will be used      * to set the data_coding field.      * @param text The short message text.      * @param alphabet The SMS alphabet to use.      * @exception ie.omk.smpp.StringTooLongException if the message is too      * long.      * @see ie.omk.smpp.util.AlphabetEncoding      * @see ie.omk.smpp.util.AlphabetEncoding#getDataCoding      * @see ie.omk.smpp.util.DefaultAlphabetEncoding      */    public void setMessageText(String text, AlphabetEncoding alphabet)	throws ie.omk.smpp.SMPPException    {	if(text == null) {	    this.message = null;	    return;	}	byte[] bytes = alphabet.encodeString(text);	this.setMessage(bytes, alphabet);    }    /** Set the message data (max 140 octets).      * Maximum data length is 140 octets. The data will be copied from the      * supplied byte array into a newly created internal one.      * @param message The byte array to take message data from.      * @exception ie.omk.smpp.StringTooLongException if the message is too long      * (XXX this will probably change to a better exception).      */    public void setMessage(byte[] message)	throws ie.omk.smpp.SMPPException    {	this.setMessage(message, 0, message.length, null);    }    /** Set the message data (max 140 octets).      * Maximum data length is 140 octets. The data will be copied from the      * supplied byte array into a newly created internal one.      * @param message The byte array to take message data from.      * @exception ie.omk.smpp.StringTooLongException if the message is too long      * (XXX this will probably change to a better exception).      */    public void setMessage(byte[] message, MessageEncoding encoding)	throws ie.omk.smpp.SMPPException    {	this.setMessage(message, 0, message.length, encoding);    }    /** Set the message data (max 140 octets).      * Maximum data length is 140 octets. The data will be copied from the      * supplied byte array into a newly created internal one. If      * <i>encoding</i> is not null, the data_coding field will be set using the      * value returned by MessageEncoding.getDataCoding.      * @param message The byte array to take message data from.      * @param start The index the message data begins at.      * @param len The length of the message data.      * @param encoding The encoding object representing the type of data in the      * message. If null, uses ie.omk.smpp.util.BinaryEncoding.      * @exception ie.omk.smpp.StringTooLongException if the message is too long      * (XXX this will probably change to a better exception).      */    public void setMessage(byte[] message, int start, int len,	    MessageEncoding encoding)	throws ie.omk.smpp.SMPPException    {	int maxLen = 0;	int dcs = -1;	if (encoding == null) {	    // use unspecified (ie binary) encoding type..	    maxLen = new BinaryEncoding().getMaxLength();	} else {	    maxLen = encoding.getMaxLength();	    dcs = encoding.getDataCoding();	}	if (message != null) {	    if ((start < 0) || (len < 0) || message.length < (start + len))		throw new ArrayIndexOutOfBoundsException();	    if (len > maxLen) {		Debug.warn(this, "setMessage", "Message data too long");		throw new StringTooLongException(maxLen);	    }	    this.message = new byte[len];	    System.arraycopy(message, start, this.message, 0, len);	    if (dcs != -1)		this.setDataCoding(encoding.getDataCoding());	} else {	    this.message = null;	}    }    /** Get the message data.      * This method returns a <i>copy</i> of the binary message data.      * @return A byte array copy of the message data. May be null.      */    public byte[] getMessage()    {	byte[] b = null;	if (this.message != null) {	    b = new byte[this.message.length];	    System.arraycopy(this.message, 0, b, 0, b.length);	}	return (b);    }    /** Get the text of the message.      * The message will be decoded according to  the data_coding field. If the      * API has no registered encoding for a data_coding value, the default      * alphabet (as returned by AlphabetFactory.getDefaultAlphabet) will be      * used.      * @see ie.omk.smpp.util.AlphabetFactory#getDefaultAlphabet      */    public String getMessageText()    {	AlphabetEncoding enc = AlphabetEncoding.getEncoding(this.dataCoding);	if (enc == null)	    enc = this.alphabet;	return (enc.decodeString(this.message));    }    /** Get the text of the message.      * @param enc The text encoding of the message bytes.      * @see ie.omk.smpp.util.AlphabetEncoding      */    public String getMessageText(AlphabetEncoding enc)	throws java.io.UnsupportedEncodingException    {	return (enc.decodeString(this.message));    }    /** Get the number of octets in the message payload.      * @return The number of octets (bytes) in the message payload.      */    public int getMessageLen()    {	return (message == null) ? 0 : message.length;    }    /** Set the service type.      * @param type The service type.      * @exception ie.omk.smpp.StringTooLongException if the service type is too      * long.      */    public void setServiceType(String type)	throws ie.omk.smpp.SMPPException    {	if(type == null) {	    serviceType = null;	    return;	}	if(type.length() < 6) {	    this.serviceType = type;	    Debug.d(this, "setServiceType", type, 4);	} else {	    Debug.warn(this, "setServiceType", "Service type too long");	    throw new StringTooLongException(5);	}    }    /** Get the service type. */    public String getServiceType()    {	return (serviceType);    }    /** Set the scheduled delivery time for the short message.      * @param d The date and time the message should be delivered.      * @throws ie.omk.smpp.SMPPException (XXX can the date be invalid?)      */    public void setDeliveryTime(SMPPDate d)	throws ie.omk.smpp.SMPPException    {	this.deliveryTime = d;	Debug.d(this, "setDeliveryTime", d, 4);    }    /** Get the current value of the scheduled delivery time for the short      * message.      */    public SMPPDate getDeliveryTime()    {	return (deliveryTime);    }    /** Set the expiry time of the message.      * If the message is not delivered by time 'd', it will be cancelled and      * never delivered to it's destination.      * @param d the date and time the message should expire.      * @exception ie.omk.smpp.SMPPException (XXX can the time be invalid?)      */    public void setExpiryTime(SMPPDate d)	throws ie.omk.smpp.SMPPException    {	expiryTime = d;	Debug.d(this, "setExpiryTime", d, 4);    }    /** Get the current expiry time of the message.      */    public SMPPDate getExpiryTime()    {	return (expiryTime);    }    /** Set the final date of the message.      * The final date is the date and time that the message reached it's final      * destination.      * @param d the date the message was delivered.      * @exception ie.omk.smpp.SMPPException (XXX can the time be invalid?)      */    public void setFinalDate(SMPPDate d)	throws ie.omk.smpp.SMPPException    {	finalDate = d;	Debug.d(this, "setFinalDate", d, 4);    }    /** Get the final date of the message.      */    public SMPPDate getFinalDate()    {	return (finalDate);    }    /** Set the message Id.      * Each submitted short message is assigned an Id by the SMSC which is used      * to uniquely identify it. SMPP v3.3 message Ids are hexadecimal numbers      * up to 9 characters long. This gives them a range of 0x0 - 0xffffffff.      * @param id The message's id.      * @exception ie.omk.smpp.InvalidMessageIDException if the message id is      * invalid.      */    public void setMessageId(String id)	throws ie.omk.smpp.SMPPException    {	if (id == null) {	    this.messageId = null;	} else {	    try {		// Using longs is probably only valid for SMPP v3.3!		long l = Long.parseLong(id, 16);		if (l < 0L || l > 0x0ffffffffL)		    throw new InvalidMessageIDException(id);		this.messageId = id;		Debug.d(this, "setMessageId", id, 4);	    } catch (NumberFormatException x) {		throw new InvalidMessageIDException(id);	    }	}    }        /** Get the message id.      */    public String getMessageId()    {	return (this.messageId);    }    /** Set the message status. This is different to the command status field.      * XXX describe the message status.      * @param st The message status.      * @exception ie.omk.smpp.SMPPException if the status is invalid.      */    public void setMessageStatus(int st)	throws ie.omk.smpp.SMPPException    {	this.messageStatus = st;	Debug.d(this, "setMessageStatus", st, 4);    }    /** Get the message status.      */    public int getMessageStatus()    {	return (this.messageStatus);    }    /** Set the error code.      * @param code The error code.      */    public void setErrorCode(int code)	throws ie.omk.smpp.SMPPException    {	errorCode = code; 	Debug.d(this, "setErrorCode", code, 4);    }    /** Get the error code.      */    public int getErrorCode()    {	return (errorCode);    }    /** Set the alphabet encoding for this message.     * @param enc The alphabet to use. If null, use DefaultAlphabetEncoding.     * @see ie.omk.smpp.util.AlphabetEncoding     * @see ie.omk.smpp.util.DefaultAlphabetEncoding     */    public void setAlphabet(AlphabetEncoding enc)    {	if (enc == null)	    this.alphabet = new ie.omk.smpp.util.DefaultAlphabetEncoding();	else	    this.alphabet = enc;    }    /** Convert this packet to a String. Not to be interpreted programmatically,      * it's just dead handy for debugging!      */    public String toString()    {	return new String("header: " + getHeaderLen() + ", "		+ Integer.toHexString(commandId) + ", "		+ commandStatus + ", "		+ Integer.toHexString(sequenceNum));    }    /** Encode the body of the SMPP Packet to the output stream. Sub classes      * should override this method to output their packet-specific fields. This      * method is called from SMPPPacket.writeTo(java.io.OutputStream) to      * encode the message.      * @param out The output stream to write to.      * @exception java.io.IOException if there's an error writing to the output      * stream.      */    protected void encodeBody(OutputStream out)	throws java.io.IOException, ie.omk.smpp.SMPPException    {	// This method is not abstract so that packets that are really just an	// SMPP header need not override it to just return the value from	// getHeaderLen.    }    /** Write the byte representation of this SMPP packet to an OutputStream      * @param out The OutputStream to use      * @exception java.io.IOException if there's an error writing to the      * output stream.      */    public final void writeTo(OutputStream out)	throws java.io.IOException, ie.omk.smpp.SMPPException    {	// Make sure the size is set properly	int commandLen = getCommandLen();	SMPPIO.writeInt(commandLen, 4, out);	SMPPIO.writeInt(commandId, 4, out);	SMPPIO.writeInt(commandStatus, 4, out);	SMPPIO.writeInt(sequenceNum, 4, out);	encodeBody(out);	Debug.d(this, "writeTo", "written!", 5);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产亚洲高清剧情介绍| 91影视在线播放| 成人sese在线| 日韩一级在线观看| 亚洲欧洲www| 激情综合色播五月| 欧美日韩不卡一区二区| 中文字幕二三区不卡| 美国十次了思思久久精品导航| 色综合天天做天天爱| 久久久久久**毛片大全| 麻豆成人av在线| 欧美高清dvd| 一区二区三区免费看视频| 成人久久视频在线观看| 欧美xxxx老人做受| 日本aⅴ亚洲精品中文乱码| 在线亚洲一区二区| 亚洲免费三区一区二区| 成人国产亚洲欧美成人综合网| 精品国产乱码久久久久久图片| 视频一区视频二区在线观看| 欧美怡红院视频| 亚洲精品成人在线| 91免费视频网址| 亚洲视频一区二区在线| a在线欧美一区| 中文字幕一区二区三区不卡在线| 国产福利一区二区三区视频在线| 欧美精品一区二区精品网| 奇米一区二区三区av| 欧美精品久久一区| 日韩影院免费视频| 日韩欧美第一区| 精品午夜久久福利影院| 精品国产91亚洲一区二区三区婷婷| 日本不卡不码高清免费观看| 欧美电影在线免费观看| 麻豆精品蜜桃视频网站| 精品99999| 国产激情视频一区二区在线观看 | 国产精品日韩精品欧美在线| 国产激情偷乱视频一区二区三区| 久久蜜桃av一区精品变态类天堂 | 亚洲三级在线免费观看| av电影天堂一区二区在线观看| 国产精品三级久久久久三级| 972aa.com艺术欧美| 一区二区三区久久| 3d成人h动漫网站入口| 麻豆成人久久精品二区三区红| 2022国产精品视频| 波多野结衣中文字幕一区| 亚洲精品中文字幕乱码三区| 欧美系列一区二区| 久久国产麻豆精品| 日本一区免费视频| 欧美日韩国产电影| 国产精品1区二区.| 一区二区三区四区在线| 日韩一区二区三区电影 | 日韩黄色免费网站| 日韩美女视频在线| 99精品久久只有精品| 日韩黄色一级片| 国产欧美日韩综合| 欧美视频一区二区| 国产福利一区在线| 日一区二区三区| 日本一区免费视频| 欧美高清视频不卡网| 国产成人精品免费网站| 一区二区三区免费观看| 久久久亚洲精华液精华液精华液 | 成人app在线观看| 亚洲电影一级黄| 国产欧美日韩综合精品一区二区| 欧美性色黄大片| 国产寡妇亲子伦一区二区| 亚洲大片一区二区三区| 中文字幕在线播放不卡一区| 欧美日韩激情一区二区三区| 国产成人亚洲综合a∨猫咪| 性做久久久久久久久| 中文字幕在线观看不卡| 日韩精品一区二区三区四区| 在线观看免费一区| 国产xxx精品视频大全| 日韩成人av影视| 亚洲你懂的在线视频| 欧美激情综合在线| 日韩久久久久久| 制服视频三区第一页精品| 色中色一区二区| 成人黄色片在线观看| 国产传媒日韩欧美成人| 久色婷婷小香蕉久久| 亚洲二区在线视频| 悠悠色在线精品| 亚洲激情在线播放| 成人欧美一区二区三区小说| 欧美精品一区二区三区很污很色的 | 精品欧美久久久| 欧美人妇做爰xxxⅹ性高电影| 97精品久久久久中文字幕| 成人性生交大片免费看视频在线| 另类小说图片综合网| 青娱乐精品视频| 日本一不卡视频| 免费欧美在线视频| 日韩精品亚洲一区二区三区免费| 亚洲国产视频直播| 亚洲影视在线观看| 亚洲精品乱码久久久久久久久 | 国内外成人在线视频| 奇米888四色在线精品| 视频在线观看国产精品| 日韩av二区在线播放| 免费成人结看片| 精品一区二区三区欧美| 精品一区二区三区影院在线午夜| 久久精品国产在热久久| 国产一区日韩二区欧美三区| 国产精品一线二线三线| 成人黄动漫网站免费app| 91欧美一区二区| 在线播放欧美女士性生活| 91精品国产综合久久久久久| 51精品国自产在线| 精品国产精品网麻豆系列| 26uuu精品一区二区三区四区在线| 精品国精品国产| 国产欧美日韩视频一区二区| 综合网在线视频| 亚洲国产一区二区三区| 麻豆成人91精品二区三区| 国产aⅴ综合色| 在线观看免费视频综合| 日韩欧美国产综合| 国产婷婷色一区二区三区| 国产精品国产精品国产专区不片| 亚洲一区二区三区小说| 美脚の诱脚舐め脚责91| 大胆欧美人体老妇| 欧美日韩亚洲综合一区| 久久精品一区四区| 亚洲成人动漫av| 丁香一区二区三区| 欧美三级一区二区| 久久精品在线观看| 婷婷成人激情在线网| 国产成人欧美日韩在线电影| 一本色道久久综合亚洲精品按摩 | 国产中文字幕一区| 色综合天天做天天爱| 欧美一级理论片| 亚洲欧美另类久久久精品| 日本不卡一二三区黄网| 一本大道久久a久久精品综合| 日韩欧美国产1| 一区二区高清在线| 国产精品2024| 欧美一区二区三区不卡| 亚洲免费大片在线观看| 国模大尺度一区二区三区| 欧美在线一区二区| 国产精品国产三级国产普通话99 | 自拍av一区二区三区| 久久不见久久见免费视频1| 色网站国产精品| 久久久久亚洲综合| 日本不卡一区二区三区| 日本电影欧美片| 日本一区二区三级电影在线观看 | 91免费在线播放| 欧美国产精品劲爆| 久久激情五月激情| 在线成人小视频| 亚洲成人自拍偷拍| 日本久久电影网| 亚洲视频在线观看一区| 丁香天五香天堂综合| 精品国产一区二区三区av性色| 日韩精品午夜视频| 欧美精选午夜久久久乱码6080| 一区在线观看免费| 成人免费视频app| 国产欧美日韩在线视频| 国产一区二区调教| 精品久久久久久最新网址| 日本欧美久久久久免费播放网| 欧美艳星brazzers| 亚洲一区二区三区中文字幕| 91色porny| 亚洲天堂网中文字| 91免费观看在线| 亚洲日本丝袜连裤袜办公室| 成人ar影院免费观看视频| 中文字幕制服丝袜成人av | 欧美剧情片在线观看|