Reading from a BufferedReader (readLine) returns null?
bufferedreader, java, string
Solution
Based on the documentation, the `BufferedReader.readLine()` returns `null` only when the end of the stream is reached. This means if the first call to `readLine()` returns `null`, there was nothing in the input stream to begin with.
Problem
I am currently trying to read a `String` from a `BufferedReader` but cant find a way to do this... Of course I tried ``` BufferedReader inStream = null; inStream = new BufferedReader(new InputStreamReader(client.getInputStream())); String test = inStream.readLine(); ``` However the result turns out as null when trying to print to a screen even though the `BufferedReader inStream` is equal to some kind of message.