+ /**
+ * Add a language file
+ * @param inFilename filename of file
+ * @throws FileNotFoundException if load failed
+ */
+ public static void addLanguageFile(String inFilename) throws FileNotFoundException
+ {
+ FileInputStream fis = null;
+ boolean fileLoaded = false;
+ try
+ {
+ File file = new File(inFilename);
+ ExternalPropsFile = new Properties();
+ fis = new FileInputStream(file);
+ ExternalPropsFile.load(fis);
+ fileLoaded = true; // everything worked
+ }
+ catch (IOException ioe) {}
+ finally { try { fis.close();
+ } catch (Exception e) {}
+ }
+ // complain if file wasn't loaded, by throwing a filenotfound exception
+ if (!fileLoaded) throw new FileNotFoundException();
+ }
+