Method to get inputstream. Removed readLine for now.