public Engine fromFile ( File file ) throws IOException { BufferedReader reader = new BufferedReader ( new InputStreamReader ( new FileInputStream ( file ) , FuzzyLite . UTF_8 ) ) ; String line ; StringBuilder textEngine = new StringBuilder ( ) ; try { while ( ( line = reader . readLine ( ) ) != null ) { textEngine . append ( line ) . append ( "\n" ) ; } } catch ( IOException ex ) { throw ex ; } finally { reader . close ( ) ; } return fromString ( textEngine . toString ( ) ) ; }
Imports the engine from the given file