从网络数据库解析xml文件时出现问题
在我的应用程序中,我从网络数据库获取一个 xml 文件,我的整体编码中只有一个错误,
它在我提到输入的行中显示错误,
我将输入提到为
url = new InputStream (http://siva.com);
它用红线标记了InputStream一词,并显示错误为无法实例化类型InputStream
如何给出URL的输入,请帮助我....
in my app i am getting a xml file from a network database, i have only one error in my overall coding,
it shows error in the line where i have mention the input,
i am mentioning the input as
url = new InputStream(http://siva.com);
it marks the word InputStream with red line and shows the error as Cannot instantiate the type InputStream
How to give the input of an URL, pls help me....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,你不能实例化InputStream,看看这个: http:// /download.oracle.com/javase/tutorial/networking/urls/readingURL.html
yeah, you can not instantiate InputStream, have a look at this: http://download.oracle.com/javase/tutorial/networking/urls/readingURL.html
再来一次:-)
Another go at it :-)