Hi,i'm reading data from serial port in java,but i'm not getting full data,it is splitting ten it will comes. example: if target device writes datas_ok but i'm getting datas_ at first read then ok second time.
case SerialPortEvent.DATA_AVAILABLE:
try {
while (inputStream.available() > 0) {
numBytes = inputStream.available();
readBufferArray = new byte[numBytes];
// int readtheBytes = (int) inputStream.skip(2);
int readBytes = inputStream.read(readBufferArray);
one = new String(readBufferArray);
System.out.println("readBytes " + one);
handleFlashResponse(one);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
plz help me thanks