Posted By:
Akshay_Prasad
Posted On:
Thursday, May 9, 2002 07:02 PM
I am having problems using the Sun JAVA comm, I am working on a WIN32 platform, specificallyt winNT, the thing is, it is able to connect to the serial port and all, but when I try and retrieve the responses, which is connected to the serial port, it takes ages to restrieve the response. This is whatr I am doing in = serialPort.getInputStream(); reader = new InputStreamReader(in); br = new BufferedReader(reader); ... ... ... input = br.readLine(); System.out.println(input); input = br.readLine(); System.out.println(input); input = br.readLine(); System.out.println(input); when it reaches the input = br.r
More>>
I am having problems using the Sun JAVA comm, I am working on a WIN32 platform, specificallyt winNT, the thing is, it is able to connect to the serial port and all, but when I try and retrieve the responses, which is connected to the serial port, it takes ages to restrieve the response. This is whatr I am doing
in = serialPort.getInputStream();
reader = new InputStreamReader(in);
br = new BufferedReader(reader);
...
...
...
input = br.readLine();
System.out.println(input);
input = br.readLine();
System.out.println(input);
input = br.readLine();
System.out.println(input);
when it reaches the input = br.readLine() thing it waits foir like 30 secs before it can print out anything. After that it prints out everything in split second.
When the reading part is called again, it again slows down, but this time it retrieve the second line is retrieved immediately after the first line(it waits before the first lien for 30 secs) but at teh thjird line it again waits for abt 30 secs to retrieve it.
Can any please help me... I am totally stuck here... thanks!
<<Less