Load from the named file.
(String name, StreamLoader loader)
| 1139 | * Load from the named file. |
| 1140 | */ |
| 1141 | private void loadFile(String name, StreamLoader loader) { |
| 1142 | InputStream clis = null; |
| 1143 | try { |
| 1144 | clis = new BufferedInputStream(new FileInputStream(name)); |
| 1145 | loader.load(clis); |
| 1146 | logger.log(Level.CONFIG, "successfully loaded file: {0}", name); |
| 1147 | } catch (FileNotFoundException fex) { |
| 1148 | // ignore it |
| 1149 | } catch (IOException e) { |
| 1150 | if (logger.isLoggable(Level.CONFIG)) |
| 1151 | logger.log(Level.CONFIG, "not loading file: " + name, e); |
| 1152 | } catch (SecurityException sex) { |
| 1153 | if (logger.isLoggable(Level.CONFIG)) |
| 1154 | logger.log(Level.CONFIG, "not loading file: " + name, sex); |
| 1155 | } finally { |
| 1156 | try { |
| 1157 | if (clis != null) |
| 1158 | clis.close(); |
| 1159 | } catch (IOException ex) { } // ignore it |
| 1160 | } |
| 1161 | } |
| 1162 | |
| 1163 | /** |
| 1164 | * Load from the named resource. |
no test coverage detected