static public XMLStore createFromFile ( String fileName , XMLStore storedDefaults ) throws java . io . IOException { File prefsFile = new File ( fileName ) ; // open file if it exists InputStream primIS = null , objIS = null ; if ( prefsFile . exists ( ) && prefsFile . length ( ) > 0 ) { primIS = new BufferedInputStream ( new FileInputStream ( prefsFile ) ) ; objIS = new BufferedInputStream ( new FileInputStream ( prefsFile ) ) ; } if ( debugWhichStore ) System . out . println ( "XMLStore read from file " + fileName ) ; XMLStore store = new XMLStore ( primIS , objIS , storedDefaults ) ; store . prefsFile = prefsFile ; return store ; }
Create an XMLStore reading from the specified filename .