public void saveMonomerCache ( ) throws IOException , MonomerException { File f = new File ( NOTATION_DIRECTORY ) ; if ( ! f . exists ( ) ) { f . mkdir ( ) ; } MonomerCache cache = new MonomerCache ( ) ; cache . setMonomerDB ( getMonomerDB ( false ) ) ; cache . setAttachmentDB ( getAttachmentDB ( ) ) ; cache . setSmilesMonomerDB ( getSmilesMonomerDB ( false ) ) ; serializeMonomerCache ( cache , MONOMER_CACHE_FILE_PATH ) ; String monomerDbXML = buildMonomerDbXMLFromCache ( cache ) ; FileOutputStream fos = new FileOutputStream ( MONOMER_DB_FILE_PATH ) ; fos . write ( monomerDbXML . getBytes ( ) ) ; fos . close ( ) ; }
save monomerCache to disk file