File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

InputStreamReader returns null

 
Rob Brew
Ranch Hand
Posts: 101
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI all

I'm writing the word "load" to a server and expexting a reply in the form of a string array. The program exits on readLine() returning null



 
Paul Clapham
Sheriff
Pie
Posts: 20185
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You call the method several times, and you didn't say which of them causes the problem, so let me simply point out that BufferedReader's readLine() method is designed to return null after it reaches the end of its underlying data stream. There's nothing abnormal about that. It's up to your code to deal with the possibility.
 
Rob Brew
Ranch Hand
Posts: 101
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the null pointer exception occurs at line 46 of the ClientChat Class. The program battleserver claims to be sending data to the pipe.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic