/**
  * Reads in the specified file as a property object.
  *
  * @param file Absolute pathname to the file.
  * @return The content of the file as a property object or <code>null</code> if an error occurred.
  */
 private static InputStream loadConfig(String file) {
   InputStream stream;
   try {
     stream = IOUtil.readConfigFile(file);
   } catch (Exception e) {
     return null;
   }
   return stream;
 }
Example #2
0
 /**
  * Returns the contents of the passed file.
  *
  * @param file The file to handle.
  * @return See above.
  */
 String readTextFile(File file) throws IOException {
   state = Editor.READY;
   if (file == null) throw new IOException("File cannot be null.");
   return IOUtil.readTextFile(file);
 }