add:com口读取工具
This commit is contained in:
@@ -54,7 +54,9 @@ public class ComPortUtil {
|
|||||||
if (bytesRead > 0) {
|
if (bytesRead > 0) {
|
||||||
String msg = new String(buffer, 0, bytesRead);
|
String msg = new String(buffer, 0, bytesRead);
|
||||||
System.out.println("--获取COM口信息--"+msg);
|
System.out.println("--获取COM口信息--"+msg);
|
||||||
function.apply(msg);
|
if (function != null){
|
||||||
|
function.apply(msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user