title: how send string to COM using java app
body: <p>I'm pretty new in this and I want to send a <code>String</code> to a specific port.
  I'm using jSerialComm-1.3.9 library, but I don't know how use it.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>public void led1() throws IOException{
      SerialPort serialPort = SerialPort.getCommPort("COM8");
      serialPort.setComPortParameters(9600,8, 1, 0);
  
      serialPort.setSerialPortParams(300,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE);
      OutputStream mOutputToPort = serialPort.getOutputStream();
  
      String mValue = "on";
  
      OutputStreamWriter osw = new OutputStreamWriter(mOutputToPort);
      osw.write(mValue, 0, mValue.length());
      osw.flush();
  }
  </code></pre>
  
  <p>Please help :s</p>