DAVID DONG
August 15th, 1999, 09:31 PM
I had tried hard to use the "COM1".
When I use the file open method to open a serial port like "COM1", it works . But the problem is
I can't get both InputStream and OutputStream at the same time. I really need to read and write content to the "COM1" at the sametime.
You know if I first open one OutputStream from "COM1" and write something then I want to receive the respond from "COM1".if I don't close the OutputStream I can't make one InputStream.
But if I close the OutputStream then open one InputStream , yeah, I get one, but the response was lost.
I tried to use RandomAccessFile, but I only can write, when I read , it always return -1.I just don't know why.
And I don't want to use the JNI.
So, anyones had recommands are welcomed here.
This is from david dong.
When I use the file open method to open a serial port like "COM1", it works . But the problem is
I can't get both InputStream and OutputStream at the same time. I really need to read and write content to the "COM1" at the sametime.
You know if I first open one OutputStream from "COM1" and write something then I want to receive the respond from "COM1".if I don't close the OutputStream I can't make one InputStream.
But if I close the OutputStream then open one InputStream , yeah, I get one, but the response was lost.
I tried to use RandomAccessFile, but I only can write, when I read , it always return -1.I just don't know why.
And I don't want to use the JNI.
So, anyones had recommands are welcomed here.
This is from david dong.