This code is indicating error at the point of reader.readLine() method, I can't see any visible error.