3 Replies Latest reply: Sep 26, 2006 3:01 AM by 807569 RSS

    HELP :- Not getting Data From InputStream on SerialPort

    807569
      Hi,

      I want to get data from serial port, First i have detacted serial port using Com API,
      i got inputstream using following code

      try {
      in = serialPort.getInputStream();

      } catch (IOException e)
      {
      e.printStackTrace();
      }


      when i try to get data from this (in) inputstream using following code then it shows inputstream size 0.

      System.out.println("inputstream size... " + in.available());
           
           while (in.available() > 0) {
                int numBytes = in.read(readBuffer);
           }

      Thanx................