(File f)
| 328 | } |
| 329 | |
| 330 | public static String readAll(File f) throws IOException { |
| 331 | BufferedReader bu = new BufferedReader(new FileReader(f)); |
| 332 | String c = ""; |
| 333 | String l = ""; |
| 334 | |
| 335 | while ((l = bu.readLine()) != null) { |
| 336 | c += l + "\n"; |
| 337 | } |
| 338 | |
| 339 | bu.close(); |
| 340 | |
| 341 | return c; |
| 342 | } |
| 343 | |
| 344 | public static String readAll(InputStream in) throws IOException { |
| 345 | BufferedReader bu = new BufferedReader(new InputStreamReader(in)); |