Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Advice on InputStream reading

Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently developing an application that uses a modem (external serial modem) for dial-up connection (9600 baud rate) to an external service. I'm using the javax.comm package.
My question is: What is the best way to determine when there is no more data to read from the InputStream?
The sample code that I've seen has done something like this: (That code's not exact but close enough)
It seems like there must be a more efficient way of doing that.
Any advice or comments are appreciated.
[ January 24, 2003: Message edited by: Blake Minghelli ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic