Java²Ù×÷´®¿Ú
RXTXÊÇÒ»¸ö¿ªÔ´°ü£¬Ö÷ÒªÊÇÔÚCOMM¿ªÔ´°üÖÐ×öÀ©ÕÅ£¬ÒÔǰµÄCOMM°üÖ»ÄÜÔÚWINDOWSÏÂÃæ¶Ô´®¿Ú»ò²¢¿Ú×ö²Ù×÷£¬À©³äºóµÄRXTX¿ÉÒÔÔÚLINUXºÍMAC϶Դ®¿ÚºÍ²¢¿Ú×ö²Ù×÷¡£ ÏÖÔÚ¿çÆ½Ì¨£º
ÔÚRXTXÍøÕ¾ÏÂÔØJAR°üºÍ¶¯Ì¬¿â
http://users.frii.com/jarvi/rxtx/download.html
ÏÂÔØºóÅäÖû·¾³
Windows
¿½±´RXTXcomm.jar Îļþµ½ \jre\lib\ext Ŀ¼ÏÂ
¿½±´rxtxSerial.dllÎļþµ½ \jre\binĿ¼ÏÂ
Linux (only x86, x86_64, ia64 here but more in the ToyBox)
¿½±´RXTXcomm.jar Îļþµ½ /jre/lib/ext Ŀ¼ÏÂ
¿½±´librxtxSerial.so Îļþµ½ /jre/lib/[machine type] (i386 for instance)Ŀ¼ÏÂ
²¢½«¿½±´ÎļþÊÍ·ÅȨÏÞ¸øËùÓÐÓû§
Solaris (sparc only so far)
¿½±´RXTXcomm.jar Îļþµ½ /jre/lib/ext Ŀ¼ÏÂ
¿½±´librxtxSerial.so Îļþµ½ /jre/lib/[machine type]Ŀ¼ÏÂ
²¢½«¿½±´ÎļþÊÍ·ÅȨÏÞ¸øËùÓÐÓû§
»·¾³´î½¨ºÃºó¿ªÊ¼Ð´´úÂëʵÏÖ
package com.solex.plc;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TooManyListenersException;
import javax.comm.CommPortIdentifier;
import javax.comm.NoSuchPortException;
import javax.comm.PortInUseException;
import javax.comm.SerialPort;
import javax.comm.SerialPortEvent;
import javax.comm.SerialPortEventListener;
//import gnu.io.CommPortIdentifier;
//import gnu.io.NoSuchPortException;
//import gnu.io.PortInUseException;
//import gnu.io.SerialPort;
//import gnu.io.SerialPortEvent;
//import gnu.io.SerialPortEventListener;
public class SerialComm implements SerialPortEventListener, Runnable
{
public final static String PORT_OWER = "MonitorApp";
private boolean isOpen;
private boolean isStart;
private boolean isSave;
Ïà¹ØÎĵµ£º
JAVA,List,Map,Set,ÈÝÆ÷
Collection
©ÀList
©¦©ÀLinkedList
©¦©ÀArrayList
©¦©¸Vector
©¦¡¡©¸Stack
©¸Set
Map
©ÀHashtable
©ÀHashMap
©¸WeakHashMap
Collection½Ó¿Ú
¡¡¡¡CollectionÊÇ×î»ù±¾µÄ¼¯ºÏ½Ó¿Ú£¬Ò»¸öCollection´ú±íÒ»×éObject£¬¼´CollectionµÄÔªËØ£¨Elements£©¡£Ò»Ð© CollectionÔÊÐíÏàͬµÄÔªËØ¶ø ......
xmlÎļþÄÚÈÝ£º
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<channel switchTime="20080101000101" k="1.07" n="6" s="55" channelId="0404" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0405" channelName="xxx ......
JavaÖÐInputstreamÓëReaderµÄÇø±ð
ReaderÖ§³Ö16λµÄUnicode×Ö·ûÊä³ö£¬InputStreamÖ§³Ö8λµÄ×Ö·ûÊä³ö¡£
ReaderºÍInputStream·Ö±ðÊÇI/O¿âÌṩµÄÁ½Ìׯ½ÐжÀÁ¢µÄµÈ¼¶»ú¹¹£¬
InputStream¡¢OutputStreamÊÇÓÃÀ´´¦Àí8λԪµÄÁ÷£¬
Reader¡¢WriterÊÇÓÃÀ´´¦Àí16λԪµÄÁ÷¡£
¶øÔÚJAVAÓïÑÔÖУ¬byteÀàÐÍÊÇ8λµÄ£¬charÀàÐÍÊÇ1 ......
»ùÓÚJavaµÄһЩȨÏÞ¿ò¼Ü¼ò½é
JOSSO
JOSSO(Java Open Single Sign-On)ÊÇÒ»¸ö¿ªÔ´µÄJ2EE-basedµÄSSO(SSO£ºµ¥Ò»µÇ¼¼¼ÊõÊÇÒ»ÖÖÈÏÖ¤ºÍÊÚȨ»úÖÆ£¬ËüÔÊÐí×¢²áÓû§Ö»ÐèÒªÔÚÈÎÒ»³ÉÔ±ÍøÕ¾ÉϵǼһ´Î£¬¶øºóÊÚȨ·ÃÎÊÆäËûÁ¬½ÓµÄ·ÖÖ§ÍøÕ¾£¬ÎÞÐèÔÙ½øÐÐÑéÖ¤µÇ¼)»ù´¡½á¹¹.ËüµÄÄ¿µÄÊÇÌṩһÖÖÓÃÀ´½â¾öÔÚÍ³Ò ......