public int loadFromFile ( final String path ) throws IOException { InputStream in = null ; try { in = getClass ( ) . getResourceAsStream ( path ) ; if ( in != null ) return loadSmiles ( in ) ; File file = new File ( path ) ; if ( file . exists ( ) && file . canRead ( ) ) return loadSmiles ( new FileInputStream ( file ) ) ; } finally { if ( in != null ) in . close ( ) ; } return 0 ; }
Load a set of abbreviations from a classpath resource or file in SMILES format . The title is seperated by a space .