小白学java-基础篇(网络)

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取得输入流;

猜你喜欢

转载自blog.csdn.net/qq_29070549/article/details/79556379
今日推荐