壁挂打印机(缺文档接口说明)、身份证读取(缺64位dll动态库)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.dpkj.modules.autoReplyPrint.utils;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class TestUtils {
|
||||
public static byte[] ReadFromFile(String fileName) {
|
||||
byte[] data = null;
|
||||
try {
|
||||
InputStream in = new FileInputStream(fileName);
|
||||
data = new byte[in.available()];
|
||||
in.read(data);
|
||||
in.close();
|
||||
} catch (Throwable tr) {
|
||||
tr.printStackTrace();
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
public static void showMessageOnUiThread(final String msg) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
JOptionPane.showMessageDialog(null, msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user