b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

applet数字签名_java applet读取mysql_软件数字签名(4)

电脑杂谈  发布时间:2017-03-06 20:03:04  来源:网络整理

public boolean isReady() {

return ready;

}

public void setReady(boolean ready) {

this.ready = ready;

}

public String getMsg() {

return msg;

}

public void setMsg(String msg) {

this.msg = msg;

}

public void paint(Graphics g ){

}

public void initPort(){

try {

portId = CommPortIdentifier.getPortIdentifier("COM1");

serialPort = (SerialPort)portId.open("Serial_Communication", 2000);

serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE);

is = serialPort.getInputStream();

} catch (NoSuchPortException e) {

e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.

} catch (PortInUseException e) {

e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.

} catch (UnsupportedCommOperationException e) {

e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.

} catch (IOException e) {

e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.

}

}

public void cleanPort(){

try {

is.close();

} catch (IOException e) {

e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.

}

serialPort.close();

}

public void init(){

initPort();

JobThread job = new JobThread(this);

Thread t = new Thread(job);

t.start();

this.setBounds(0,0,0,0);

this.repaint();

}

public void start(){

}

public void stop(){

cleanPort();

}

private void showPorts(Graphics g ){


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-36137-4.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...