javaIO流工具类,可以直接使用

时间:2016-06-23 07:14:45
【文件属性】:
文件名称:javaIO流工具类,可以直接使用
文件大小:4KB
文件格式:JAVA
更新时间:2016-06-23 07:14:45
IO流工具类 /** * 实现将文件读取到一个byte数组 */ public static byte[] read2(String filename){ try{ InputStream in = new FileInputStream(filename); byte[] buf = new byte[in.available()]; in.read(buf); in.close(); return buf; }catch(IOException e){ throw new RuntimeException(e); } }

网友评论