public boolean load() {

        boolean exists;

        if (!DatabaseURL.isFileBasedDatabaseType(database.getType())) {
            return true;
        }

        try {
            exists = super.load();
        } catch (Exception e) {
            throw Error.error(ErrorCode.FILE_IO_ERROR,
                              ErrorCode.M_LOAD_SAVE_PROPERTIES, new Object[] {
                fileName, e
            });
        }

        if (!exists) {
            return false;
        }

        filterLoadedProperties();

        String version = getProperty(hsqldb_compatible_version);

        // do not open if the database belongs to a later (future) version
        int check = version.substring(0, 5).compareTo(THIS_VERSION);

        if (check > 0) {
            throw Error.error(ErrorCode.WRONG_DATABASE_FILE_VERSION);
        }

        version = getProperty(db_version);

        if (version.charAt(2) == '6') {
            setProperty(hsqldb_cache_version, "1.6.0");
        }

        JavaSystem.gcFrequency = getIntegerProperty(runtime_gc_interval, 0);

        return true;
    }
public boolean load ( ) { boolean exists ; if ( ! DatabaseURL . isFileBasedDatabaseType ( database . getType ( ) ) ) { return true ; } try { exists = super . load ( ) ; } catch ( Exception e ) { throw Error . error ( ErrorCode . FILE_IO_ERROR , ErrorCode . M_LOAD_SAVE_PROPERTIES , new Object [ ] { fileName , e } ) ; } if ( ! exists ) { return false ; } filterLoadedProperties ( ) ; String version = getProperty ( hsqldb_compatible_version ) ; int check = version . substring ( 0 , 5 ) . compareTo ( THIS_VERSION ) ; if ( check > 0 ) { throw Error . error ( ErrorCode . WRONG_DATABASE_FILE_VERSION ) ; } version = getProperty ( db_version ) ; if ( version . charAt ( 2 ) == '6' ) { setProperty ( hsqldb_cache_version , "1.6.0" ) ; } JavaSystem . gcFrequency = getIntegerProperty ( runtime_gc_interval , 0 ) ; return true ; }
Creates file with defaults if it didn't exist.
Returns false if file already existed.