91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.7MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2023-11-10
  • 語言: Java
  • 標簽: rxtx??串口??java??

資源簡介

包含RXTX源代碼,各種環境下的jar包以及例子。 win32,64,linux測試通過。

資源截圖

代碼片段和文件信息

JDK?<=?1.4
???/**
?????*?@return????A?HashSet?containing?the?CommPortIdentifier?for?all?serial?ports?that?are?not?currently?being?used.
?????*/
????public?static?HashSet?getAvailableSerialPorts()?{
????????HashSet?h?=?new?HashSet();
????????Enumeration?thePorts?=?CommPortIdentifier.getPortIdentifiers();
????????while?(thePorts.hasMoreElements())?{
????????????CommPortIdentifier?com?=?(CommPortIdentifier)?thePorts.nextElement();
????????????switch?(com.getPortType())?{
????????????case?CommPortIdentifier.PORT_SERIAL:
????????????????try?{
????????????????????CommPort?thePort?=?com.open(“CommUtil“?50);
????????????????????thePort.close();
????????????????????h.add(com);
????????????????}?catch?(PortInUseException?e)?{
????????????????????System.out.println(“Port?“??+?com.getName()?+??“?is?in?use.“);
????????????????}?catch?(Exception?e)?{
????????????????????System.err.println(“Failed?to?open?port?“?+?com.getName());
????????????????????e.printStackTrace();
????????????????}
????????????}
????????}
????????return?h;
????}
JDK?>=?5.0
???/**
?????*?@return????A?HashSet?containing?the?CommPortIdentifier?for?all?serial?ports?that?are?not?currently?being?used.
?????*/
????public?static?HashSet?getAvailableSerialPorts()?{
????????HashSet?h?=?new?HashSet();
????????Enumeration?thePorts?=?CommPortIdentifier.getPortIdentifiers();
????????while?(thePorts.hasMoreElements())?{
????????????CommPortIdentifier?com?=?(CommPortIdentifier)?thePorts.nextElement();
????????????switch?(com.getPortType())?{
????????????case?CommPortIdentifier.PORT_SERIAL:
????????????????try?{
????????????????????CommPort?thePort?=?com.open(“CommUtil“?50);
????????????????????thePort.close();
????????????????????h.add(com);
????????????????}?catch?(PortInUseException?e)?{
????????????????????System.out.println(“Port?“??+?com.getName()?+?“?is?in?use.“);
????????????????}?catch?(Exception?e)?{
????????????????????System.err.println(“Failed?to?open?port?“?+??com.getName());
????????????????????e.printStackTrace();
????????????????}
????????????}
????????}
????????return?h;
????}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????2186??2018-03-27?12:28??rxtx\examples\Discovering?available?comm?ports.java

?????文件???????1026??2018-03-27?12:28??rxtx\examples\Discovering?comm?ports.java

?????文件???????3782??2018-03-27?12:31??rxtx\examples\Event?based?Two?Way?Communication.txt

?????文件???????3029??2018-03-27?12:27??rxtx\examples\ParallelCommunication.java

?????文件???????3077??2018-03-27?12:30??rxtx\examples\Two?way?communcation?with?the?serial?port.java

?????文件????????166??2018-03-27?12:32??rxtx\readme.txt

?????文件?????610316??2018-03-27?12:19??rxtx\rxtx-2.1-7-bins-r2.zip

?????文件????1345757??2018-03-27?12:20??rxtx\rxtx-2.1-7r2-source.zip

?????目錄??????????0??2018-03-27?12:31??rxtx\examples

?????目錄??????????0??2018-03-27?12:32??rxtx

-----------?---------??----------?-----??----

??????????????1969339????????????????????10


評論

共有 條評論