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

資源簡(jiǎn)介

java串口通信,java調(diào)用監(jiān)聽本機(jī)的com口,java也能調(diào)用驅(qū)動(dòng)硬件,直接和硬件交互。這是一個(gè)全面的demo,有調(diào)用界面可看,可用于調(diào)試工具

資源截圖

代碼片段和文件信息

package?com.atgeretg.serialport.exception;

import?java.io.IOException;
import?java.io.PrintWriter;
import?java.io.StringWriter;

/**
?*?負(fù)責(zé)將傳入的Exception中的錯(cuò)誤信息提取出來(lái)并轉(zhuǎn)換成字符串;
?*?
?*?@author?atgeretg
?*/
public?class?ExceptionWriter?{

/**
?*?將Exception中的錯(cuò)誤信息封裝到字符串中并返回該字符串
?*?
?*?@param?e
?*????????????包含錯(cuò)誤的Exception
?*?@return?錯(cuò)誤信息字符串
?*/
public?static?String?getErrorInfoFromException(Exception?e)?{

StringWriter?sw?=?null;
PrintWriter?pw?=?null;

try?{
sw?=?new?StringWriter();
pw?=?new?PrintWriter(sw);
e.printStackTrace(pw);
return?“\r\n“?+?sw.toString()?+?“\r\n“;

}?catch?(Exception?e2)?{
return?“出錯(cuò)啦!未獲取到錯(cuò)誤信息,請(qǐng)檢查后重試!“;
}?finally?{
try?{
if?(pw?!=?null)?{
pw.close();
}
if?(sw?!=?null)?{
sw.close();
}
}?catch?(IOException?e1)?{

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-11-16?20:07??SerialPortDemo\
?????文件?????????404??2017-08-14?09:20??SerialPortDemo\.classpath
?????文件?????????343??2017-08-14?09:20??SerialPortDemo\.fatjar
?????文件?????????373??2017-08-14?09:20??SerialPortDemo\.project
?????目錄???????????0??2017-11-16?20:07??SerialPortDemo\.settings\
?????文件??????????85??2017-08-14?09:20??SerialPortDemo\.settings\org.eclipse.core.resources.prefs
?????文件?????????617??2017-08-14?09:20??SerialPortDemo\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2017-11-16?20:07??SerialPortDemo\bin\
?????目錄???????????0??2017-11-16?20:07??SerialPortDemo\bin\com\
?????目錄???????????0??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\
?????目錄???????????0??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\
?????目錄???????????0??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\
?????文件????????1597??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\ExceptionWriter.class
?????文件?????????571??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\NoSuchPort.class
?????文件?????????571??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\NotASerialPort.class
?????文件?????????538??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\PortInUse.class
?????文件?????????583??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\ReadDataFromSerialPortFailure.class
?????文件?????????574??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\SendDataToSerialPortFailure.class
?????文件?????????618??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\SerialPortInputStreamCloseFailure.class
?????文件?????????625??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\SerialPortOutputStreamCloseFailure.class
?????文件?????????598??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\SerialPortParameterFailure.class
?????文件?????????562??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\exception\TooManyListeners.class
?????目錄???????????0??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\manage\
?????文件????????5009??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\manage\SerialPortManager.class
?????目錄???????????0??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\ui\
?????文件?????????925??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\ui\Mainframe$1.class
?????文件?????????591??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\ui\Mainframe$2.class
?????文件????????1944??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\ui\Mainframe$SerialListener.class
?????文件???????10470??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\ui\Mainframe.class
?????目錄???????????0??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\utils\
?????文件????????1295??2017-11-16?20:07??SerialPortDemo\bin\com\atgeretg\serialport\utils\DialogShowUtils.class
............此處省略27個(gè)文件信息

評(píng)論

共有 條評(píng)論