forked from LupusNobilis/java-org.hwo
Implement close() for serial port streams
parent
e5832f7f2e
commit
ef6826c570
|
@ -320,6 +320,11 @@ public class NewSerialPort {
|
||||||
}
|
}
|
||||||
return nRead;
|
return nRead;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() throws IOException {
|
||||||
|
NewSerialPort.this.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class NewSerialPortOutputStream extends OutputStream
|
public class NewSerialPortOutputStream extends OutputStream
|
||||||
|
@ -388,6 +393,10 @@ public class NewSerialPort {
|
||||||
write(b, 0, b.length);
|
write(b, 0, b.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() throws IOException {
|
||||||
|
NewSerialPort.this.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static public String[] getPortNames(){
|
static public String[] getPortNames(){
|
||||||
|
|
Loading…
Reference in New Issue