(File file)
| 278 | } |
| 279 | |
| 280 | public void setScript(File file) throws IOException { |
| 281 | BufferedReader reader = null; |
| 282 | try { |
| 283 | reader = new BufferedReader(new FileReader(file)); |
| 284 | setScript(reader); |
| 285 | } catch (FileNotFoundException e) { |
| 286 | LOG.warn("unable to find the file", e); |
| 287 | } finally { |
| 288 | if (reader != null) { |
| 289 | try { |
| 290 | reader.close(); |
| 291 | } catch (IOException ignored) { |
| 292 | } |
| 293 | } |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | public void setScript(String script) throws IOException { |
| 298 | if (script == null) |