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

📄 smsdeliver.cs

📁 详细说明:用C#编写的的中国联通Sgip协议
💻 CS
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   SMSDeliver.java
using System;
namespace com.sms.sgip.data
{
	
	// Referenced classes of package com.sms.sgip.data:
	//            SMSData, SgipException
	
	public class SMSDeliver:SMSData
	{
		virtual public System.String UserNumber
		{
			get
			{
				return userNumber;
			}
			
			set
			{
				userNumber = value;
			}
			
		}
		virtual public System.String SpNumber
		{
			get
			{
				return spNumber;
			}
			
			set
			{
				spNumber = value;
			}
			
		}
		virtual public int Tp_pid
		{
			get
			{
				return tp_pid;
			}
			
			set
			{
				tp_pid = value;
			}
			
		}
		virtual public int Tp_udhi
		{
			get
			{
				return tp_udhi;
			}
			
			set
			{
				tp_udhi = value;
			}
			
		}
		virtual public int MessageCoding
		{
			get
			{
				return messageCoding;
			}
			
			set
			{
				messageCoding = value;
			}
			
		}
		virtual public int MsgLen
		{
			get
			{
				return msgLen;
			}
			
			set
			{
				msgLen = value;
			}
			
		}
		virtual public System.String MessageContent
		{
			get
			{
				return messageContent;
			}
			
			set
			{
				messageContent = value;
			}
			
		}
		virtual public System.String Reserve
		{
			get
			{
				return reserve;
			}
			
			set
			{
				reserve = value;
			}
			
		}
		
		private System.String userNumber;
		private System.String spNumber;
		private int tp_pid;
		private int tp_udhi;
		private int messageCoding;
		private int msgLen;
		private System.String messageContent;
		private System.String reserve;
		
		public SMSDeliver()
		{
		}
		
		//UPGRADE_TODO: Class“java.io.DataInputStream”被转换为具有不同行为的 'System.IO.BinaryReader'。 "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioDataInputStream'"
		//UPGRADE_NOTE: Synchronized 关键字已从方法“read”中移除。添加了锁定表达式。 "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1027'"
		public override void  read(System.IO.BinaryReader m_is)
		{
			lock (this)
			{
				int i = 0;
				sbyte[] head1 = new sbyte[4];
				head1[0] = (sbyte) m_is.ReadByte();
				head1[1] = (sbyte) m_is.ReadByte();
				head1[2] = (sbyte) m_is.ReadByte();
				head1[3] = (sbyte) m_is.ReadByte();
				messageLength = (head1[0] & 0xff) << 24 | (head1[1] & 0xff) << 16 | (head1[2] & 0xff) << 8 | head1[3] & 0xff;
				sbyte[] head2 = new sbyte[4];
				head2[0] = (sbyte) m_is.ReadByte();
				head2[1] = (sbyte) m_is.ReadByte();
				head2[2] = (sbyte) m_is.ReadByte();
				head2[3] = (sbyte) m_is.ReadByte();
				commandID = (head2[0] & 0xff) << 24 | (head2[1] & 0xff) << 16 | (head2[2] & 0xff) << 8 | head2[3] & 0xff;
				sbyte[] head3 = new sbyte[4];
				head3[0] = (sbyte) m_is.ReadByte();
				head3[1] = (sbyte) m_is.ReadByte();
				head3[2] = (sbyte) m_is.ReadByte();
				head3[3] = (sbyte) m_is.ReadByte();
				seqAddr = (head3[0] & 0xff) << 24 | (head3[1] & 0xff) << 16 | (head3[2] & 0xff) << 8 | head3[3] & 0xff;
				sbyte[] head4 = new sbyte[4];
				head4[0] = (sbyte) m_is.ReadByte();
				head4[1] = (sbyte) m_is.ReadByte();
				head4[2] = (sbyte) m_is.ReadByte();
				head4[3] = (sbyte) m_is.ReadByte();
				seqDate = (head4[0] & 0xff) << 24 | (head4[1] & 0xff) << 16 | (head4[2] & 0xff) << 8 | head4[3] & 0xff;
				sbyte[] head5 = new sbyte[4];
				head5[0] = (sbyte) m_is.ReadByte();
				head5[1] = (sbyte) m_is.ReadByte();
				head5[2] = (sbyte) m_is.ReadByte();
				head5[3] = (sbyte) m_is.ReadByte();
				sequence = (head5[0] & 0xff) << 24 | (head5[1] & 0xff) << 16 | (head5[2] & 0xff) << 8 | head5[3] & 0xff;
				i = 0;
				sbyte[] body1;
				for (body1 = new sbyte[21]; i < body1.Length; i++)
					body1[i] = (sbyte) m_is.ReadByte();
				
				userNumber = new System.String(SupportClass.ToCharArray(SupportClass.ToByteArray(body1)));
				i = 0;
				sbyte[] body2;
				for (body2 = new sbyte[21]; i < body2.Length; i++)
					body2[i] = (sbyte) m_is.ReadByte();
				
				spNumber = new System.String(SupportClass.ToCharArray(SupportClass.ToByteArray(body2)));
				sbyte body3 = (sbyte) m_is.ReadByte();
				tp_pid = body3;
				sbyte body4 = (sbyte) m_is.ReadByte();
				tp_udhi = body4;
				sbyte body5 = (sbyte) m_is.ReadByte();
				messageCoding = body5;
				sbyte[] body6 = new sbyte[4];
				body6[0] = (sbyte) m_is.ReadByte();
				body6[1] = (sbyte) m_is.ReadByte();
				body6[2] = (sbyte) m_is.ReadByte();
				body6[3] = (sbyte) m_is.ReadByte();
				msgLen = (body6[0] & 0xff) << 24 | (body6[1] & 0xff) << 16 | (body6[2] & 0xff) << 8 | body6[3] & 0xff;
				i = 0;
				sbyte[] body7;
				for (body7 = new sbyte[msgLen]; i < body7.Length; i++)
					body7[i] = (sbyte) m_is.ReadByte();
				
				messageContent = new System.String(SupportClass.ToCharArray(SupportClass.ToByteArray(body7)));
				i = 0;
				sbyte[] body8;
				for (body8 = new sbyte[8]; i < body8.Length; i++)
					body8[i] = (sbyte) m_is.ReadByte();
				
				reserve = new System.String(SupportClass.ToCharArray(SupportClass.ToByteArray(body8)));
			}
		}
		
		//UPGRADE_TODO: Class“java.io.DataOutputStream”被转换为具有不同行为的 'System.IO.BinaryWriter'。 "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioDataOutputStream'"
		//UPGRADE_NOTE: Synchronized 关键字已从方法“write”中移除。添加了锁定表达式。 "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1027'"
		public virtual void  write(System.IO.BinaryWriter m_os)
		{
			lock (this)
			{
				int i = 0;
				int j = 0;
				sbyte[] temp = SupportClass.ToSByteArray(SupportClass.ToByteArray(messageContent));
				msgLen = temp.Length;
				messageLength = 77 + msgLen;
				commandID = 4;
				sbyte[] b = new sbyte[messageLength];
				sbyte[] head1 = getInteger4(messageLength);
				sbyte[] head2 = getInteger4(commandID);
				sbyte[] head3 = getInteger4(seqAddr);
				sbyte[] head4 = getInteger4(seqDate);
				sbyte[] head5 = getInteger4(sequence);
				sbyte[] body1 = SMSData.getText(21, userNumber);
				sbyte[] body2 = SMSData.getText(21, spNumber);
				sbyte body3 = getInteger1(tp_pid);
				sbyte body4 = getInteger1(tp_udhi);
				sbyte body5 = getInteger1(messageCoding);
				sbyte[] body6 = getInteger4(msgLen);
				sbyte[] body7 = SMSData.getText(msgLen, messageContent);
				sbyte[] body8 = SMSData.getText(8, reserve);
				for (j = 0; j < head1.Length; j++)
				{
					b[i] = head1[j];
					i++;
				}
				
				for (j = 0; j < head2.Length; j++)
				{
					b[i] = head2[j];
					i++;
				}
				
				for (j = 0; j < head3.Length; j++)
				{
					b[i] = head3[j];
					i++;
				}
				
				for (j = 0; j < head4.Length; j++)
				{
					b[i] = head4[j];
					i++;
				}
				
				for (j = 0; j < head5.Length; j++)
				{
					b[i] = head5[j];
					i++;
				}
				
				for (j = 0; j < body1.Length; j++)
				{
					b[i] = body1[j];
					i++;
				}
				
				for (j = 0; j < body2.Length; j++)
				{
					b[i] = body2[j];
					i++;
				}
				
				b[i] = body3;
				i++;
				b[i] = body4;
				i++;
				b[i] = body5;
				i++;
				for (j = 0; j < body6.Length; j++)
				{
					b[i] = body6[j];
					i++;
				}
				
				for (j = 0; j < body7.Length; j++)
				{
					b[i] = body7[j];
					i++;
				}
				
				for (j = 0; j < body8.Length; j++)
				{
					b[i] = body8[j];
					i++;
				}
				
				m_os.Write(SupportClass.ToByteArray(b));
			}
		}
	}
}

⌨️ 快捷键说明

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