资源简介

压缩包中包含四个主文件:DEMO(myeclipse项目源代码)、串口操作动态库DLL、JAVA操作串口JAR包、开发说明书。其中DLL包含了64位的和32位的。

资源截图

代码片段和文件信息

package com.ethink.serialport.exception;

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

/**
 * 负责将传入的Exception中的错误信息提取出来并转换成字符串;
 * 
 * @author xiaolang update 2018/02/10
 */
public class ExceptionWriter {

/**
 * 将Exception中的错误信息封装到字符串中并返回该字符串
 * 
 * @param e
 *            包含错误的Exception
 * @return 错误信息字符串
 */
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 “出错啦!未获取到错误信息,请检查后重试!“;
} finally {
try {
if (pw != null) {
pw.close();
}
if (sw != null) {
sw.close();
}
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .......       406  2008-12-08 14:45  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x64\BuildProperties.txt

    .......      1057  2008-12-08 11:37  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x64\Install.txt

    .......      2098  2013-06-26 04:26  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x64\Readme.txt

    .......       833  2013-06-26 04:25  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x64\ReleaseNotes.txt

    .......     60984  2008-12-08 14:45  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x64\RXTXcomm.jar

    .......     84992  2008-12-08 14:45  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x64\rxtxParallel.dll

    .......    129536  2008-12-08 14:45  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x64\rxtxSerial.dll

    .......       406  2008-12-08 14:45  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x86\BuildProperties.txt

    .......      1057  2008-12-08 11:37  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x86\Install.txt

    .......      2098  2013-06-26 04:26  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x86\Readme.txt

    .......       833  2013-06-26 04:25  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x86\ReleaseNotes.txt

    .......     60984  2008-12-08 14:45  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x86\RXTXcomm.jar

    .......     76288  2008-12-08 14:45  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x86\rxtxParallel.dll

    .......    108544  2008-12-08 14:45  JAVA操作串口demo&dll&jar-win-x86&x64\mfz-rxtx-2.2-20081207-win-x86\rxtxSerial.dll

     文件        413  2016-08-23 17:53  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\.classpath

     文件        357  2016-08-23 17:19  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\.fatjar

     文件        390  2016-08-23 15:21  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\.project

     文件         88  2016-08-23 15:21  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\.settings\org.eclipse.core.resources.prefs

     文件        629  2016-08-23 15:21  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\.settings\org.eclipse.jdt.core.prefs

     文件       1593  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\exception\ExceptionWriter.class

     文件        567  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\exception\NoSuchPort.class

     文件        567  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\exception\NotASerialPort.class

     文件        534  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\exception\PortInUse.class

     文件        579  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\exception\ReadDataFromSerialPortFailure.class

     文件        570  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\exception\SendDataToSerialPortFailure.class

     文件        614  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\exception\SerialPortInputStreamCloseFailure.class

     文件        621  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\exception\SerialPortOutputStreamCloseFailure.class

     文件        594  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\exception\SerialPortParameterFailure.class

     文件        558  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\exception\TooManyListeners.class

     文件       4805  2018-02-10 16:50  JAVA操作串口demo&dll&jar-win-x86&x64\SerialPortDemo\bin\com\ethink\serialport\manage\SerialPortManager.class

............此处省略53个文件信息

评论

共有 条评论