Every time you read the data that you want call flush. In your example on client side after reading "abcdefghijklmnop" call flush. You can do this every time you are done with reading.
On Wed, Jun 22, 2011 at 1:09 PM, wu mark <[email protected]> wrote: > Dear : > > Thanks. > > Sorry, I'm a new learner for Android. Should I add this command in > BTServer or BTClient? > > Best Regards, > Mark > > 2011/6/22 shailesh mistry <[email protected]> > >> use buffer.flush to clear last msg >> Regards, >> *Shailesh Mistry* >> +91 9974148507 >> >> >> >> >> On Wed, Jun 22, 2011 at 10:53 AM, mark2011 <[email protected]>wrote: >> >>> Dear All : >>> >>> I write a BTClient.java on a ViewPad & a BTServer.java on a ACER >>> A500. I hope to tranfer data through the Bluetooth devices. When I >>> input some data on Viewpad, the same data will be displayed on A500. >>> >>> My problem is that A500 will display the old buffer + replaced data. >>> For example: >>> >>> BTClient input BTServer >>> display >>> 1. abcdefghijklmnop abcdefghijklmnop >>> 2. 12345 >>> 12345fghijklmnop >>> >>> How do I to clear the output buffer before it display the new-coming >>> data? >>> >>> Thanks. >>> >>> Best Regards, >>> Mark >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Android Developers" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

