![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络编程
DM搬运工
梦想还是要有的
展开
-
JAVA网络编程之URL下载资源
下载图片 public class URLTest { public static void main(String[] args) throws IOException { URL url = new URL("https://imgessl.kugou.com/stdmusic/20200909/20200909112317319417.jpg"); //打开链接 HttpURLConnection urlConnection = (HttpU.原创 2021-04-13 17:11:36 · 105 阅读 · 0 评论 -
JAVA网络编程之UDP实践
1、消息发送 发送端: public class UdpClient { public static void main(String[] args) throws IOException { //1、建立一个socket DatagramSocket socket = new DatagramSocket(); /* byte buf[], int offset, int length, .原创 2021-04-13 16:57:11 · 98 阅读 · 0 评论