//org.apache.commons.io.IOUtils.toByteArray已经有实现 String filePath = "D:\\aaa.txt"; in = new FileInputStream(new File(filePath)); fileBytes =IOUtils.toByteArray(in);
//org.apache.commons.io.IOUtils.toByteArray已经有实现 String filePath = "D:\\aaa.txt"; in = new FileInputStream(new File(filePath)); fileBytes =IOUtils.toByteArray(in);