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