I'm trying to use TelnetClient and BufferedReader to read lines as they come in, as the WeatherTelnet sample does. However, while it's easy enough to read each char, I can't seem to get the last line.

What's the correct idiom to using TelnetClient to read each and every line? Surely this is part of the API for TelnetClient and I'm just not seeing it. (?)

"As Jean mentioned, this is a shortcoming of using the BufferReader if you know your input never ends with either the linefeed '\n' or carriage return '\r' character. After your while loop you may want to use the ready() method to test if there is indeed more text after the last line read, and use one of the read() methods to pull in that remaining text. Or, substitute another text reader for BufferReader all together."

http://stackoverflow.com/a/18518488/262852





thanks,

Thufir

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to