Hi, I am having a problem closing the serial connection with the palm. I am using cldc 1.02 with dataInputStream.
public void
closeStream()
{
try
{
dis = null;
dis.close();
}
catch(Exception iox)
{System.out.println("io exception at close stream");}
}
The exception above is caught, a thread doing a dis.readByte() is unlocked (i assume) and the program terminates. However, when I try and hotSync, I get an error message stating that the serial port is in use by another application. Am I missing something when closing the dataInputStream? If I do not set dis to null before closing, the program hangs due to the blocked thread.
Thanks very much in advance,
chris chayka
cchayka@elantech-inc.com
public void
closeStream()
{
try
{
dis = null;
dis.close();
}
catch(Exception iox)
{System.out.println("io exception at close stream");}
}
The exception above is caught, a thread doing a dis.readByte() is unlocked (i assume) and the program terminates. However, when I try and hotSync, I get an error message stating that the serial port is in use by another application. Am I missing something when closing the dataInputStream? If I do not set dis to null before closing, the program hangs due to the blocked thread.
Thanks very much in advance,
chris chayka
cchayka@elantech-inc.com