NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
``` 从文件中读取字节 ``` ### 构造方法 ``` FileInputStream(File file) File对象 FileInputStream(String name) 文件路径名 ``` ### 方法 read ``` FileInputStream fs = new FileInputStream("test.txt"); byte[] b = new byte[2]; int len; while ((len = fs.read(b)) != -1){ System.out.println(new String(b)); } fs.close(); ```