2019年1月27日

NIO

摘要: package com.test; import org.junit.Test; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.nio.channels.SelectionKey; import java.nio.channels.S... 阅读全文

posted @ 2019-01-27 19:38 lina2014 阅读(79) 评论(0) 推荐(0) 编辑

UDP

摘要: package com.test; import org.junit.Test; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.SocketException; p... 阅读全文

posted @ 2019-01-27 19:32 lina2014 阅读(76) 评论(0) 推荐(0) 编辑

Socket编程

摘要: package com.test; import org.junit.Test; import java.io.*; import java.net.ServerSocket; import java.net.Socket; public class TestSocket { @Test public void client() { Socket socke... 阅读全文

posted @ 2019-01-27 18:58 lina2014 阅读(82) 评论(0) 推荐(0) 编辑

字节流和字符流

摘要: package com.test; import org.junit.Test; import java.io.*; public class TestIO { @Test public void test() { InputStream in = null; try { in = new FileInput... 阅读全文

posted @ 2019-01-27 16:43 lina2014 阅读(93) 评论(0) 推荐(0) 编辑

File类

摘要: File类操作 阅读全文

posted @ 2019-01-27 14:28 lina2014 阅读(108) 评论(0) 推荐(0) 编辑

导航