Added InputStream support