上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 47 下一页
摘要: 导入第三方jar:commons-io @Test public void test7() throws IOException { File srcFile = new File("hello.txt"); File destFile = new File("hello2.txt"); //Fil 阅读全文
posted @ 2022-09-02 22:38 iTao0128 阅读(41) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-09-02 22:20 iTao0128 阅读(19) 评论(0) 推荐(0)
摘要: /* 序列化过程:将内存中的java对象保存到磁盘中或通过网络传输出去,使用ObjectOutputStream */ @Test public void test5() throws IOException { FileOutputStream fos = new FileOutputStream 阅读全文
posted @ 2022-09-02 21:39 iTao0128 阅读(47) 评论(0) 推荐(0)
摘要: @Test public void test4() throws IOException { InputStreamReader isr = null; try { FileInputStream fis = new FileInputStream("D:\\java.txt"); isr = ne 阅读全文
posted @ 2022-09-01 21:13 iTao0128 阅读(15) 评论(0) 推荐(0)
摘要: @Test public void test3(){ BufferedInputStream bis = null; BufferedOutputStream bos = null; try { //节点流 FileInputStream fis = new FileInputStream("D:\ 阅读全文
posted @ 2022-09-01 20:51 iTao0128 阅读(15) 评论(0) 推荐(0)
摘要: 抽象基类 文件流 缓存流 InputStream FileInputStream BufferedInputStreamOutputStream FileOutputStream BufferedOutputStreamReader FileReader BufferedReaderWriter F 阅读全文
posted @ 2022-08-29 22:34 iTao0128 阅读(25) 评论(0) 推荐(0)
摘要: 构造器 路径分隔符 常用方法 阅读全文
posted @ 2022-08-29 22:31 iTao0128 阅读(15) 评论(0) 推荐(0)
摘要: 在集合中使用泛型: 1.集合接口或集合类在jsdk5.0时都修改为带泛型的结构。 2.在实例化集合类时,可以指明具体的泛型类型。 3.指明完以后,在集合类或接口中凡是定义类或接口时,内部结构(方法,构造器,属性等)使用到类的泛型的位置,都指定为实例化的泛型类型, 比如:add(E e),实例化以后, 阅读全文
posted @ 2022-08-28 11:12 iTao0128 阅读(12) 评论(0) 推荐(0)
摘要: 返回线程安全的集合/map 阅读全文
posted @ 2022-08-27 21:51 iTao0128 阅读(20) 评论(0) 推荐(0)
摘要: | Collection接口:单列集合,用来存储一个一个的对象。 | List接口:存储有序的,可重复的数据 | ArrayList、LinkedList(链表结构)、Vector(几乎不使用) | Set接口:存储无序的,不可重复的数据 | HashSet:主要实现类,线程不安全的,可以存储nul 阅读全文
posted @ 2022-08-22 20:46 iTao0128 阅读(30) 评论(0) 推荐(0)
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 47 下一页