Wake up on DataInputStream.readInt()?
Hi all,
I am developing an application for two mobiles that communicate using Bluetooth. Communication is handled by a method containing several DataInputStream.readInt()'s. I noticed data missing because it is overwritten by either the method containing those readInts or events fired of by the users. I conclude I have a problem with accessing a shared resource.
I can solve this problem using threads. But I am wondering if there is not something I miss. Like a wakeup call from an input stream. What I mean is I put the reading of the data in a seperate thread and wait for a wake-up call when data is available. Is there something like that, of do I need to check regularly whether data is available to be read.
Maik

