标签:void char 输入流 pictures code exception oid user desc
package test; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; /** * @author shusheng * @description * @Email shusheng@yiji.com * @date 2018/11/12 11:00 */ public class InputStreamReaderDemo1 { public static void main(String[] args) throws IOException { InputStreamReader isr = new InputStreamReader( new FileInputStream("C:\\Users\\shusheng\\Pictures\\111.txt")); char[] chs = new char[1024]; int len = 0; while ((len = isr.read(chs)) != -1) { System.out.println(new String(chs, 0, len)); } isr.close(); } }
标签:void char 输入流 pictures code exception oid user desc
原文地址:https://www.cnblogs.com/zuixinxian/p/9946544.html