?? smstools.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><!--JBuilder QuickDoc-->
<HEAD>
<TITLE>Class smspack.SMSTools</TITLE><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
</HEAD>
<BODY>
<H2>
<FONT SIZE="-1">smspack</FONT>
<BR>Klasse SMSTools</H2>
<DL>
<DT>class <B>SMSTools</B>
</DL>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF"><TD COLSPAN=1><FONT SIZE="+2">
<B>Methoden-Detail</B>
</FONT></TD></TR></TABLE>
<H3>convertCharArray2String</H3>
<PRE>
public static String <B>convertCharArray2String</B>(char[] chararray)</PRE>
<DL><DD>Convert a char array to a string<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>test</CODE> - character array</DD>
<DT><B>Returns:</B><DD>string</DD>
</DL>
<HR>
<H3>getPDUPart</H3>
<PRE>
public static byte[] <B>getPDUPart</B>(String number,
boolean numbertype,
String message)</PRE>
<DL><DD>Create the main part part of a PDU, for sending via AT commands to the mobile phone. The mobile phone complete this part of a PDU with some data of the mobile phone and sends it then to the base station.<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>number</CODE> - dialing number</DD>
<DD><CODE>numbertype</CODE> - national/international dialing number</DD>
<DD><CODE>message</CODE> - message to send (SMS)</DD>
<DT><B>Returns:</B><DD>PDU</DD>
</DL>
<HR>
<H3>convertDialNumber</H3>
<PRE>
public static byte[] <B>convertDialNumber</B>(String number)</PRE>
<DL><DD>Convert a dialing number into the GSM format<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>number</CODE> - dialing number</DD>
<DT><B>Returns:</B><DD>coded dialing number</DD>
</DL>
<HR>
<H3>decodeAddressField</H3>
<PRE>
public static String <B>decodeAddressField</B>(String number)</PRE>
<DL><DD>Convert the address field (dialing number) from the GSM format<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>number</CODE> - dialing number</DD>
<DT><B>Returns:</B><DD>decoded dialing number</DD>
</DL>
<HR>
<H3>convertUnicode2GSM</H3>
<PRE>
public static byte[] <B>convertUnicode2GSM</B>(String msg)</PRE>
<DL><DD>Convert a Unicode text string into the GSM standard alphabet<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - text string in ASCII</DD>
<DT><B>Returns:</B><DD>text string in GSM standard alphabet</DD>
</DL>
<HR>
<H3>convertGSM2Unicode</H3>
<PRE>
public static char <B>convertGSM2Unicode</B>(int b)</PRE>
<DL><DD>Convert one GSM standard alphabet character into a Unicode character<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - one GSM standard alphabet character</DD>
<DT><B>Returns:</B><DD>one Unicode character</DD>
</DL>
<HR>
<H3>compress</H3>
<PRE>
public static byte[] <B>compress</B>(byte[] data)</PRE>
<DL><DD>Compress a readable text message into the GSM standard alphabet (1 character -> 7 bit data)<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - text string in Unicode</DD>
<DT><B>Returns:</B><DD>text string in GSM standard alphabet</DD>
</DL>
<HR>
<H3>getSMSText</H3>
<PRE>
public static String <B>getSMSText</B>(String data)</PRE>
<DL><DD>Extracts from a given SMS the Text<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - SMS string</DD>
<DT><B>Returns:</B><DD>text date, time and SMS text string in Unicode specification of the coding: TS 23.040 test pattern data: 0791947101670000040C9194617011078800004010023112914016D737DB7C0EBBCF2069D8BD66B340CDBA3B3D4603 ADDRESS OF DELIVERING SMSC NUMBER IS : +491710760000 TYPE OF NR. : (0x10) International NPI : (0x01) ISDN/Telephone (E.164/163) MESSAGE HEADER FLAGS (0x04) MESSAGE TYPE : SMS DELIVER ORIGINATING ADDRESS NUMBER IS : +491607117088 TYPE OF NR. : (0x10) International NPI : (0x01) ISDN/Telephone (E.164/163) PROTOCOL IDENTIFIER (0x00) DATA CODING SCHEME (0x00) COMPRESSION : OFF MESSAGE CLASS : NONE ALPHABET USED : 7 bit default SMSC TIMESTAMP : 20.01.04 13:21:19 GMT+1,00 USER DATA PART OF SM USER DATA LENGTH : 22 septets USER DATA (TEXT) : Wolfgang Rankl, Munich</DD>
</DL>
<HR>
<H3>expand</H3>
<PRE>
public static String <B>expand</B>(byte[] indata)</PRE>
<DL><DD>Expands a compressed GSM message in a readable text message (7 bit data -> 1 character)<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>indata</CODE> - text string in GSM standard alphabet</DD>
<DT><B>Returns:</B><DD>text string in Unicode</DD>
</DL>
<HR>
<H3>toHexString</H3>
<PRE>
public static char[] <B>toHexString</B>(byte[] data)</PRE>
<DL><DD>Convert data into a hex string<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - to convert</DD>
<DT><B>Returns:</B><DD>in hex string converted data</DD>
</DL>
<HR>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -