InputStream read doesn't read the data?

Your code looks reasonable to me, although I generally structure the loop slightly different to avoid the duplication of the read call.

I knew the inputStream is coming from an HTTPConnection, what I missed is that my colleague added a line to test a custom InputStream class that was causing the error. Should have gone back earlier, thanks for the tip! :) – Tamar Aug 9 '09 at 16:05.

Path file = ...; InputStream in = null; try { in = file.newInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String line = null; while ((line = reader.readLine())! = null) { System.out. Println(line); } } catch (IOException x) { System.err.

Println(x); } finally { if (in! = null) in.close(); }.

That's assuming that it's text data to start with, and doesn't give any idea for why it might be happening in the first place. – Jon Skeet Aug 9 '09 at 15:56.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions