public boolean save ( ) { boolean blnRet = false ; File objFile = null ; String strName = null ; String strTemp = null ; Iterator < String > itrSec = null ; INISection objSec = null ; FileWriter objWriter = null ; try { if ( this . mhmapSections . size ( ) == 0 ) return false ; objFile = new CSFile ( this . mstrFile ) ; if ( objFile . exists ( ) ) objFile . delete ( ) ; objWriter = new FileWriter ( objFile ) ; itrSec = this . mhmapSections . keySet ( ) . iterator ( ) ; while ( itrSec . hasNext ( ) ) { strName = ( String ) itrSec . next ( ) ; objSec = ( INISection ) this . mhmapSections . get ( strName ) ; strTemp = objSec . toString ( ) ; objWriter . write ( strTemp ) ; objWriter . write ( "\r\n" ) ; objSec = null ; } blnRet = true ; } catch ( IOException IOExIgnore ) { } finally { if ( objWriter != null ) { closeWriter ( objWriter ) ; objWriter = null ; } if ( objFile != null ) objFile = null ; if ( itrSec != null ) itrSec = null ; } return blnRet ; }
Flush changes back to the disk file . If the disk file does not exists then creates the new one .