输入和输出流的运用
?private static String readFileContent(File file) throws Exception {??BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));??StringBuffer content = new StringBuffer();????for (String line = null; (line =reader.readLine()) != null; ){???content.append(line).append("\n");??}??return content.toString();?}
?上面是读取文件的的输出流