This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
The while loop in your code has already fetched out the whole content and reached the end of the page. Attempting to read another line after the end gives null. As a solution, remove that System.out.println line and append each inputLine to a StringBuilder. Each time the loop completes, your StringBuilder instance has the whole content.