ÀûÓöÌÐÅè·¢ËͶÌÐŵÄJava´úÂë
ǰһ¶ÎÐèÒªÓöÌÐÅè·¢ËͶÌÐÅ£¬Ð´ÁËÒ»¶Î¶ÌÐÅè·¢ËͶÌÐŵĴúÂ룺
import javax.comm.*;
import java.util.*;
import java.io.*;
import org.smslib.*;
public class smsModem
{
private static LinkedList<COutgoingMessage> msgList = new LinkedList<COutgoingMessage>();
private static String com="";
private static int baudRate=0;
private static CService srv;
private static boolean isSending=false;
private static void testAndSetCom()
/**
Try to find out which com port is used by modem and the work baudrate.
*/
{
CommPortIdentifier portId;
Enumeration portList;
//int bauds[] = { 9600, 19200, 38400, 115200 };
int bauds[]={38400, 115200};
portList = CommPortIdentifier.getPortIdentifiers();
while (portList.hasMoreElements())
{
portId = (CommPortIdentifier) portList.nextElement();
System.out.println("PORTID:"+portId);
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL)
{
System.out.println("Found port: " + portId.getName());
for (int i = 0; i < bauds.len
Ïà¹ØÎĵµ£º
´úÀíģʽ
´úÀíģʽµÄ×÷ÓÃ: ΪÆäËû¶ÔÏóÌṩһÖÖ´úÀíÒÔ¿ØÖƶÔÕâ¸ö¶ÔÏóµÄ·ÃÎÊ£¬ÔÚijЩÇé¿öÏ£¬Ò»¸ö¿Í»§²»Ïë»òÕß²»ÄÜÖ±½ÓÒýÓÃÁíÒ»¸ö¶ÔÏó£¬
¶ø´úÀí¶ÔÏó¿ÉÒÔÔÚ¿Í»§¶ËºÍÄ¿±ê¶ÔÏóÖ®¼äÆðµ½ ÖÐ½é µÄ×÷ÓÃ
¾ÙÒ»¸öÀý×Ó: ijһ¸öÈËÏëÇëÒ»¸ö¾Ö³¤ÎªËû°ìһЩÊÂÇé,Õâ¸öÈË¿ÉÄܲ»ÄÜÖ±½ÓÈ¥Õâ¸ö¾Ö³¤£¬ÒòΪ¾Ö³¤²»ÈÏʶËû£¬¼´Ê¹¿Í»§¸øËûËÍÀñ» ......
JavaʹÓÃÁ½ÖÖ·½·¨À´´¦Àí¶àÏß³Ì
µÚÒ»ÖÖÊÇ×ÓÀ໯Thread¶ÔÏó¡£ Thread¶ÔÏóÊÇJavaÌṩµÄ·â×°Ï̵߳ĶÔÏó¡£Èç¹û×ÓÀ໯ThreadÀ࣬Ôò±ØÐëÖØÔØÕâ¸öÀàÖеÄrun·½·¨ÒÔÌṩÓÉÕâ¸öÌØÊâÏß³ÌÖ´ÐеĴúÂë¡£ÒòΪJava²»Ö§³Ö¶àÖØ¼Ì³Ð£¬ËùÒÔÈç¹ûÄãµÄÀàÐèÒª×ÓÀ໯ÁíÒ»¸öÀ࣬ÄÇô¾Í²»ÄÜ×ÓÀ໯Thread¶ÔÏó¡£
µÚ¶þÖÖÊÇʵÏÖÓÉJavaÌṩµÄRunnable ......
ÒÔÏÂÊÇÐèÒª»ñµÃÅäÖÃÎļþµÄÀ࣬ÆäÖлñµÃ /config.properties ÎļþµÄÊý¾Ý
package com.chinacache.boss.queryservice.util;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import org.apache.log4j.Logger;
public final class ConfigConstant {
static Logger logg ......
xml »ù´¡ÖªÊ¶
1.½éÉÜ
1£©DOM£¨JAXP Crimson½âÎöÆ÷£©
DOMÊÇÓÃÓëÆ½Ì¨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐѰÕÒ
ÌØ¶¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµºÍ¹¹Ôì²ã´Î½á¹¹£¬È»ºó²ÅÄÜ×öÈκι¤ ......
Ò»¡¢·´ÉäµÄ¸ÅÄî £º
·´ÉäµÄ¸ÅÄîÊÇÓÉSmithÔÚ1982ÄêÊ×´ÎÌá³öµÄ£¬Ö÷ÒªÊÇÖ¸³ÌÐò¿ÉÒÔ·ÃÎÊ¡¢¼ì²âºÍÐÞ¸ÄËü±¾Éí״̬»òÐÐΪµÄÒ»ÖÖÄÜÁ¦¡£ÕâÒ»¸ÅÄîµÄÌá³öºÜ¿ìÒý·¢Á˼ÆËã»ú¿ÆÑ§ÁìÓò¹ØÓÚÓ¦Ó÷´ÉäÐÔµÄÑо¿¡£ËüÊ×Ïȱ»³ÌÐòÓïÑÔµÄÉè¼ÆÁìÓòËù²ÉÓÃ,²¢ÔÚLispºÍÃæÏò¶ÔÏó·½ÃæÈ¡µÃÁ˳ɼ¨¡£ÆäÖÐLEAD/LEAD++ ¡¢OpenC++ ¡¢MetaXaºÍOpenJavaµÈ¾ÍÊ ......