Change the API to get any input stream