Java - IO

IO

[plain]  view plain  copy
  1. 应用程序需要和外部设备进行数据交互,最常见的外部设备包含磁盘和网络  
  2.     IO就是指应用程序对这些设备的数据输入输出  
  3. IO分为两大块  
  4.     File类,处理文件本身  
  5.     流类,对文件内容进行读写操作  
  6. File  
  7.     一个File类的对象,表示了磁盘上的文件或者目录  
  8.     File类提供了一些与平台无关的方法来操纵文件  
  9.     File类提供了各种方法  
  10.         创建删除重命名文件  
  11.         判断文件是否存在和读写权限    
  12.         设置和查询文件最近修改时间等操作  
  13.         不能够编辑文件  

创建File对象的几种方法

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;    
  2.     
  3. import java.io.File;    
  4. import java.io.IOException;    
  5.     
  6. public class IO {    
  7.     public static void main(String[] args) {    
  8.         File file = new File("d:\\文件夹");    
  9.         //创建目录(必须的)  
  10.         file.mkdir();    
  11.         // 第一种方法    
  12.         File file1 = new File("d:\\文件夹\\a.txt");    
  13.         // 第二种方法    
  14.         File file2 = new File("d:" + File.separatorChar + "文件夹"    
  15.                 + File.separatorChar + "b.txt");    
  16.         // 第三种方法    
  17.         File file3 = new File("d:""文件夹\\c.txt");    
  18.         // 第四种方法    
  19.         File file4 = new File("d:\\文件夹""d.txt");    
  20.         // 第五种方法    
  21.         File file5 = new File(new File("d:\\文件夹"), "e.txt");    
  22.         try {    
  23.             file1.createNewFile();    
  24.             file2.createNewFile();    
  25.             file3.createNewFile();    
  26.             file4.createNewFile();    
  27.             file5.createNewFile();    
  28.         } catch (IOException e) {    
  29.             e.printStackTrace();    
  30.         }    
  31.     }    
  32. }   

File的常用方法

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.File;  
  4. import java.io.IOException;  
  5.   
  6. public class IO {  
  7.     public static void main(String[] args) {  
  8.         // 创建目录  
  9.         createDir("d:\\文件夹");  
  10.         // 创建文件  
  11.         createFile("d:\\文件夹\\t.txt");  
  12.         // 删除文件  
  13.         deleteFile("d:\\文件夹\\t.txt");  
  14.         // 删除目录  
  15.         delDirectory(new File("d:\\文件夹"));  
  16.     }  
  17.   
  18.     public static void createDir(String pathName) {  
  19.         File f = new File(pathName);  
  20.         f.mkdirs();  
  21.         // 文件或目录是否存在  
  22.         if (f.exists()) {  
  23.             System.out.println("目录创建成功");  
  24.         }  
  25.     }  
  26.   
  27.     public static void createFile(String pathName) {  
  28.         File f = new File(pathName);  
  29.         try {  
  30.             if (f.exists()) {  
  31.                 System.out.println("文件已经存在");  
  32.             } else {  
  33.                 f.createNewFile();  
  34.                 System.out.println("创建成功");  
  35.             }  
  36.         } catch (IOException e) {  
  37.             e.printStackTrace();  
  38.         }  
  39.     }  
  40.   
  41.     public static void deleteFile(String pathName) {  
  42.         File f = new File(pathName);  
  43.         if (f.exists()) {  
  44.             // 删除此抽象路径名表示的文件或目录  
  45.             f.delete();  
  46.             if (f.exists()) {  
  47.                 System.out.println("删除失败");  
  48.             } else {  
  49.                 System.out.println("删除成功");  
  50.             }  
  51.         } else {  
  52.             System.out.println("文件已经不存在");  
  53.         }  
  54.     }  
  55.   
  56.     public static void delDirectory(File fileList) {  
  57.         File[] files = fileList.listFiles();  
  58.         for (int i = 0; i < files.length; i++) {  
  59.             if (files[i].isFile()) {  
  60.                 files[i].delete();  
  61.             } else {  
  62.                 delDirectory(files[i]);  
  63.             }  
  64.         }  
  65.         fileList.delete();  
  66.     }  
  67. }  

File类查找文件的几种方法

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.File;  
  4.   
  5. public class IO {  
  6.     public static void main(String[] args) {  
  7.         File file = new File("d:\\文件夹");  
  8.         // 返回String类型(不返回子文件)  
  9.         String[] str = file.list();  
  10.         for (String s : str) {  
  11.             System.out.println(s);  
  12.         }  
  13.         System.out.println("---------------");  
  14.         // 返回File类型(不返回子文件)  
  15.         File[] f = file.listFiles();  
  16.         for (File fi : f) {  
  17.             System.out.println(fi.getName());  
  18.         }  
  19.         System.out.println("---------------");  
  20.         // 递归返回所有文件包括子文件  
  21.         findFile(file);  
  22.     }  
  23.   
  24.     public static void findFile(File fileList) {  
  25.         File[] files = fileList.listFiles();  
  26.         for (int i = 0; i < files.length; i++) {  
  27.             if (files[i].isFile()) {  
  28.                 System.out.println(files[i].getName());  
  29.             } else {  
  30.                 if (files[i].listFiles().length > 0) {  
  31.                     System.out.println(files[i].getName());  
  32.                     findFile(files[i]);  
  33.                 } else {  
  34.                     System.out.println(files[i].getName());  
  35.                 }  
  36.             }  
  37.         }  
  38.     }  
  39. }  
  40. /* 
  41. 打印结果: 
  42.     a.txt 
  43.     新建文件夹 
  44.     --------------- 
  45.     a.txt 
  46.     新建文件夹 
  47.     --------------- 
  48.     a.txt 
  49.     新建文件夹 
  50.     b.txt 
  51. */  

递归查看文件夹结构图

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.File;  
  4.   
  5. public class Test {  
  6.     public static void main(String[] args) {  
  7.         File file = new File("d:\\KwDownload");  
  8.         listChids(file, 0);  
  9.   
  10.     }  
  11.   
  12.     public static void listChids(File f, int level) {  
  13.         String preSrt = "";  
  14.         for (int i = 0; i < level; i++) {  
  15.             preSrt += "----";  
  16.         }  
  17.         System.out.println(preSrt + f.getName());  
  18.         if (!f.isDirectory()) {  
  19.             return;  
  20.         } else {  
  21.             File[] fs = f.listFiles();  
  22.             for (int i = 0; i < fs.length; i++) {  
  23.                 listChids(fs[i], level + 1);  
  24.             }  
  25.         }  
  26.     }  
  27. }  
  28. /* 
  29. KwDownload 
  30. ----abc.jnt 
  31. ----Lyric 
  32. --------Lenka-Trouble Is A Friend (麻烦是个朋友).lrc 
  33. --------S.H.E-安全感.lrc 
  34. --------大庆小芳-败家娘们儿.lrc 
  35. ----song 
  36. --------zjd 
  37. ------------大庆小芳-败家娘们儿.mp3 
  38. --------大庆小芳-败家娘们儿.mp3 
  39. ----Temp 
  40. --------175B801812D20FF0.aac 
  41. --------2A94710E1FB7FC13.wma 
  42. --------475724778F0B2848.wma 
  43. --------544A55A6B2DA2305.exe 
  44. --------6F7B9764DF582BF1.wma 
  45. --------C64DFA53A508C6BE.zip 
  46. --------E20D265167F98506.mp3 
  47. --------F53A522FF938F1F4.zip 
  48. */  

File过滤器

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2. import java.io.File;  
  3. import java.io.FilenameFilter;  
  4. public class IO {  
  5.     public static void main(String[] args) {  
  6.         File file = new File("d:\\文件夹");  
  7.         findJava1(file);  
  8.         System.out.println("-------------");  
  9.         findJava2(file);  
  10.     }  
  11.   
  12.     // 使用原始方法过滤文件  
  13.     public static void findJava1(File file) {  
  14.         String[] str = file.list();  
  15.         for (String s : str) {  
  16.             if (s.endsWith(".java")) {  
  17.                 System.out.println(s);  
  18.             }  
  19.         }  
  20.     }  
  21.   
  22.     // 使用FilenameFilter过滤文件  
  23.     public static void findJava2(File file) {  
  24.         String[] str = file.list(new FilenameFilter() {  
  25.             public boolean accept(File dir, String name) {  
  26.                 if (name.endsWith(".java"))  
  27.                     return true;  
  28.                 return false;  
  29.             }  
  30.         });  
  31.         for (String s : str) {  
  32.             System.out.println(s);  
  33.         }  
  34.     }  
  35. }  

IO流

[plain]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. Java的流建立在4个抽象类的基础上  
  2.     InputStream,OutputStream,Reader,Writer        
  3.     InputStream和OutputStream是字节流  
  4.     Reader和Writer是字符流     
  5. 一般的流都是单向的,java.io.RandomAccessFile类比较特殊,是一个双向的    
  6. IO流分类    
  7.     根据功能分为:      
  8.         输入流(Input Stream)和输出流(Output Stream)  
  9.         通常人站在程序的角度来判断流的方向  
  10.         输入流只能读数据  
  11.         输出流只能写数据  
  12.     根据结构分为:      
  13.         字节流(Byte Stream)和字符流(Character Stream)  
  14.         字节流以字节为单位进行数据传输,用于处理字节和二进制对象      
  15.         字符流以字符为单位进行数据传输,用于处理字符和字符串    
  16.     根据数据流操作方式分为:      
  17.         节点流(Node Stream)和过滤流(Filter Stream)  
  18.         节点流是可以直接创建的流  
  19.         过滤流是可以装饰节点流让节点流功能更强大,过滤流使用了装饰者模式     
  20.         节点流和过滤流一般是配合使用  
  21.     转换流  
  22.         字节流和字符流之间的转化,一般字节流不方便操作,转换为字符流处理  

FileOutputSteam/BufferedOutputStream写文件

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.BufferedOutputStream;  
  4. import java.io.FileOutputStream;  
  5.   
  6. public class IO {  
  7.     // 输出流写入文件  
  8.     public void execute1() throws Exception {  
  9.         FileOutputStream fos = new FileOutputStream("D:\\文件夹\\a.txt"true);  
  10.         String str = "abcdefghigklmnopqrstuvwxyz";  
  11.         byte[] buf = str.getBytes();  
  12.         fos.write(buf);  
  13.         fos.close();  
  14.     }  
  15.   
  16.     // 输出流带缓冲写入文件  
  17.     public void execute2() throws Exception {  
  18.         FileOutputStream fos = new FileOutputStream("D:\\文件夹\\a.txt"true);  
  19.         BufferedOutputStream bos = new BufferedOutputStream(fos);  
  20.         String str = "abcdefghigklmnopqrstuvwxyz";  
  21.         byte[] buf = str.getBytes();  
  22.         bos.write(buf);  
  23.         // 使用缓冲流一定要flush(),如果关闭流会自动flush()  
  24.         bos.close();  
  25.     }  
  26.   
  27.     public static void main(String[] args) throws Exception {  
  28.         new IO().execute1();  
  29.         new IO().execute2();  
  30.     }  
  31. }  

FileInputSteam/BufferedInputStream读文件

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.BufferedInputStream;  
  4. import java.io.FileInputStream;  
  5.   
  6. public class IO {  
  7.     // 输入流读取文件  
  8.     public void execute1() throws Exception {  
  9.         FileInputStream fis = new FileInputStream("D:\\文件夹\\a.txt");  
  10.         byte[] buf = new byte[1024];  
  11.         // 从输入流中读取一定数量的字节并将其存储在缓冲区数组b中  
  12.         int len = fis.read(buf);  
  13.         String str = "";  
  14.         while (len != -1) {  
  15.             // 构造一个新的String,方法是使用指定的字符集解码字节的指定子数组  
  16.             str = new String(buf, 0, len);  
  17.             len = fis.read();  
  18.         }  
  19.         System.out.print(str);  
  20.         fis.close();  
  21.     }  
  22.   
  23.     // 输入流带缓冲读取文件  
  24.     public void execute2() throws Exception {  
  25.         FileInputStream fis = new FileInputStream("D:\\文件夹\\a.txt");  
  26.         BufferedInputStream bis = new BufferedInputStream(fis);  
  27.         byte[] buf = new byte[1024];  
  28.         int len = bis.read(buf);  
  29.         String str = "";  
  30.         while (len != -1) {  
  31.             str = new String(buf, 0, len);  
  32.             len = fis.read();  
  33.         }  
  34.         System.out.print(str);  
  35.         // 使用缓冲流一定要flush(),如果关闭流会自动flush()  
  36.         bis.close();  
  37.     }  
  38.   
  39.     public static void main(String[] args) throws Exception {  
  40.         new IO().execute1();  
  41.         System.out.println();  
  42.         new IO().execute2();  
  43.     }  
  44. }  
  45. /* 
  46. 打印结果: 
  47.     abcdefghigklmnopqrstuvwxyzabcdefghigklmnopqrstuvwxyz 
  48.     abcdefghigklmnopqrstuvwxyzabcdefghigklmnopqrstuvwxyz 
  49. */  

实现文件拷贝

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.BufferedInputStream;  
  4. import java.io.BufferedOutputStream;  
  5. import java.io.FileInputStream;  
  6. import java.io.FileOutputStream;  
  7.   
  8. public class IOInputOutputStream {  
  9.     // 输入流输出流实现拷贝文件  
  10.     public void execute1() throws Exception {  
  11.         FileInputStream fis = new FileInputStream("D:\\文件夹\\a.txt");  
  12.         FileOutputStream fos = new FileOutputStream("D:\\文件夹\\b.txt",true);  
  13.         byte[] buf = new byte[1024];  
  14.         int len = 0;  
  15.         while (-1 != len) {  
  16.             fos.write(buf, 0, len);  
  17.             len = fis.read(buf, 0, buf.length);  
  18.         }  
  19.         fis.close();  
  20.         fos.close();  
  21.     }  
  22.   
  23.     // 输入流输出流带缓冲实现拷贝文件  
  24.     public void execute2() throws Exception {  
  25.         FileInputStream fis = new FileInputStream("D:\\文件夹\\a.txt");  
  26.         BufferedInputStream bis = new BufferedInputStream(fis);  
  27.         FileOutputStream fos = new FileOutputStream("D:\\文件夹\\b.txt",true);  
  28.         BufferedOutputStream bos = new BufferedOutputStream(fos);  
  29.         byte[] buf = new byte[1024];  
  30.         int len = 0;  
  31.         while (-1 != len) {  
  32.             bos.write(buf, 0, len);  
  33.             len = bis.read(buf, 0, buf.length);  
  34.         }  
  35.         // 使用缓冲流一定要flush(),如果关闭流会自动flush()  
  36.         bis.close();  
  37.         bos.close();  
  38.     }  
  39. }  

DataOutputStream/DateInputStream读写数据

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.DataInputStream;  
  4. import java.io.DataOutputStream;  
  5. import java.io.FileInputStream;  
  6. import java.io.FileOutputStream;  
  7.   
  8. public class IODateInputStream {  
  9.     public static void main(String[] args) throws Exception {  
  10.         DataOutputStream dos = new DataOutputStream(new FileOutputStream(  
  11.                 "D:\\文件夹\\c.txt"true));  
  12.         byte b = 3;  
  13.         int i = 12;  
  14.         char c = 'a';  
  15.         float f = 3.3f;  
  16.         //这里并不是写入了一个3,而是写入了一个byte类型的3  
  17.         dos.writeByte(b);  
  18.         dos.writeInt(i);  
  19.         dos.writeChar(c);  
  20.         dos.writeFloat(f);  
  21.         dos.close();  
  22.         //读和写要保持一致  
  23.         DataInputStream dis = new DataInputStream(new FileInputStream(  
  24.                 "D:\\文件夹\\c.txt"));  
  25.         System.out.println(dis.readByte());  
  26.         System.out.println(dis.readInt());  
  27.         System.out.println(dis.readChar());  
  28.         System.out.println(dis.readFloat());  
  29.         dis.close();  
  30.     }  
  31. }  

Writer写文件

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.BufferedWriter;  
  4. import java.io.FileWriter;  
  5.   
  6. public class IO {  
  7.     // 不带缓存  
  8.     public void execute1() throws Exception {  
  9.         String str = "李文超,hello!";  
  10.         FileWriter fw = new FileWriter("D:\\a.txt"true);  
  11.         fw.write(str);  
  12.         // 必须关闭输出字节流,否则不能写入文件  
  13.         fw.close();  
  14.     }  
  15.   
  16.     // 带缓存  
  17.     public void execute2() throws Exception {  
  18.         String str = "李文超,hello!";  
  19.         FileWriter fw = new FileWriter("D:\\a.txt"true);  
  20.         BufferedWriter bfw = new BufferedWriter(fw);  
  21.         bfw.write(str);  
  22.         // 必须关闭输出字节流,否则不能写入文件  
  23.         bfw.close();  
  24.     }  
  25.   
  26.     public static void main(String[] args) throws Exception {  
  27.         new IO().execute1();  
  28.         new IO().execute2();  
  29.     }  
  30. }  

Reader读文件

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.BufferedReader;  
  4. import java.io.FileReader;  
  5.   
  6. public class IO {  
  7.     public void execute1() throws Exception {  
  8.         FileReader fr = new FileReader("D:\\a.txt");  
  9.         char[] buf = new char[1024];  
  10.         int len = fr.read(buf);  
  11.         System.out.println(new String(buf, 0, len));  
  12.         fr.close();  
  13.     }  
  14.   
  15.     public void execute2() throws Exception {  
  16.         FileReader fr = new FileReader("D:\\a.txt");  
  17.         BufferedReader br = new BufferedReader(fr);  
  18.         String str = br.readLine();  
  19.         System.out.println(str);  
  20.         br.close();  
  21.     }  
  22.   
  23.     public static void main(String[] args) throws Exception {  
  24.         new IO().execute1();  
  25.         System.out.println();  
  26.         new IO().execute2();  
  27.     }  
  28. }  

InputStreamReader

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.BufferedReader;  
  4. import java.io.InputStreamReader;  
  5.   
  6. //控制台输入  
  7. public class IO {  
  8.     public static void main(String[] args) throws Exception {  
  9.         InputStreamReader isr = new InputStreamReader(System.in);  
  10.         BufferedReader br = new BufferedReader(isr);  
  11.         String str = br.readLine();  
  12.         System.out.println(str);  
  13.         br.close();  
  14.     }  
  15. }  

RandomAccessFile

[plain]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. 双向的流(随机访问文件类)    
  2. 它不是派生于InputStream和OutputStream,而是实现了DataInput和DataOutput    
  3. 它支持定位请求,可以在文件内部放置指针    
  4. 有两个构造方法:    
  5.     RandomAccessFile(File fileObject,String access)    
  6.     RandomAccessFile(String fileName,String access)    
  7.     access都决定允许访问何种文件类型,如果是r可读,如果是rw可读可写  
  8.  RandomAccessFile案例说明  
  9.     向文件中写3个雇员,然后按2,1,3的顺序读出  
  10.     需要注意的是,要想按位置读出来,必须保证每条记录在文件中的具体位置,  
  11.         假设name是8个字符,少于8个的补空格,大于8个的去掉多余的部分  
  12.         由于年龄是int的,所以不管这个年龄多大,只要不超过int的范围,  
  13.         在内存中都是占4个字节大小  

RandomAccessFile案例

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. package com.itlwc;  
  2.   
  3. import java.io.RandomAccessFile;  
  4.   
  5. class Employee {  
  6.     String name;  
  7.     int age;  
  8.     final static int LEN = 8;  
  9.   
  10.     public Employee(String name, int age) {  
  11.         if (name.length() > LEN) {  
  12.             name = name.substring(08);  
  13.         } else {  
  14.             while (name.length() < LEN) {  
  15.                 name = name + "\u0000";  
  16.             }  
  17.         }  
  18.         this.name = name;  
  19.         this.age = age;  
  20.     }  
  21. }  
  22.   
  23. public class Test {  
  24.     public static void main(String[] args) throws Exception {  
  25.         Employee e1 = new Employee("zhangsan"23);  
  26.         Employee e2 = new Employee("lisi"26);  
  27.         Employee e3 = new Employee("wangwu"30);  
  28.         RandomAccessFile ra = new RandomAccessFile("d:\\employee.txt""rw");  
  29.         ra.write(e1.name.getBytes());  
  30.         ra.writeInt(e1.age);  
  31.         ra.write(e2.name.getBytes());  
  32.         ra.writeInt(e2.age);  
  33.         ra.write(e3.name.getBytes());  
  34.         ra.writeInt(e3.age);  
  35.         ra.close();  
  36.         RandomAccessFile raf = new RandomAccessFile("d:\\employee.txt""r");  
  37.         int len = 8;  
  38.   
  39.         raf.skipBytes(12);// 跳过第1个雇员信息  
  40.         System.out.println("第二个雇员信息");  
  41.         String name = "";  
  42.         for (int i = 0; i < len; i++) {  
  43.             byte b = raf.readByte();  
  44.             char c = (char) b;  
  45.             name = name + c;  
  46.         }  
  47.         System.out.println("name: " + name);  
  48.         System.out.println("age: " + raf.readInt());  
  49.   
  50.         raf.seek(0);// 将文件指针移动到文件开始位置  
  51.         System.out.println("第一个雇员信息");  
  52.         name = "";  
  53.         for (int i = 0; i < len; i++) {  
  54.             byte b = raf.readByte();  
  55.             char c = (char) b;  
  56.             name = name + c;  
  57.         }  
  58.         System.out.println("name: " + name);  
  59.         System.out.println("age: " + raf.readInt());  
  60.   
  61.         raf.skipBytes(12);// 跳过第2个雇员信息  
  62.         System.out.println("第三个雇员信息");  
  63.         name = "";  
  64.         for (int i = 0; i < len; i++) {  
  65.             byte b = raf.readByte();  
  66.             char c = (char) b;  
  67.             name = name + c;  
  68.         }  
  69.         System.out.println("name: " + name);  
  70.         System.out.println("age: " + raf.readInt());  
  71.   
  72.         raf.close();  
  73.     }  
  74. }  
  75. /* 
  76. 打印结果: 
  77.     第二个雇员信息 
  78.     name: lisi 
  79.     age: 26 
  80.     第一个雇员信息 
  81.     name: zhangsan 
  82.     age: 23 
  83.     第三个雇员信息 
  84.     name: wangwu 
  85.     age: 30 
  86. */  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值