1、URL类:
a、public URL(String spec) throws MalformedURLException
根据指定的地址实例化URL对象;
b、public URL(String protocol,String host,int port,String file) throws MalformedURLException
实例化URL对象,并指定协议、主机、端口名称、资源文件;
c、public URLConnection openConnection() throws IOException
取得一个URLConnection对象;
d、public final InputStream() throws IOException
取得输入流;
小白学java-基础篇(网络)
猜你喜欢
转载自blog.csdn.net/qq_29070549/article/details/79556379
今日推荐
周排行