public class ReaderDemo { public static void main(String[] args) throws IOException { File f=new File("e:\\tylg\\简介.txt"); Reader reader=new FileReader(f); char[] ch=new char[1024]; //StringBuilder sb=new StringBuilder(); reader.read(ch); reader.close(); System.out.println("内容为:"+new String(ch)); } }
java中 Reader 流的用法
最新推荐文章于 2024-04-08 09:30:00 发布