SerialPort com;
private boolean isOutputOpen = false;
public MoppyCOMBridge(String portName) throws NoSuchPortException, PortInUseException, UnsupportedCommOperationException, IOException {
CommPortIdentifier cpi = CommPortIdentifier.getPortIdentifier(portName);
com = (SerialPort) cpi.open("MoppyDesk", 2000);
com.setSerialPortParams(SERIAL_RATE, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
os = com.getOutputStream();
isOutputOpen = true;
}