Add support for InputStream