@Override
    protected void syncSpi() throws BackingStoreException
    {
        if (isRemoved())
        {
            return;
        }

        final File file = FilePreferencesGenerator.getPreferencesFile();

        if (!file.exists())
        {
            return;
        }

        synchronized (file)
        {
            Properties p = new Properties();
            try
            {
                p.load(new FileInputStream(file));

                StringBuilder sb = new StringBuilder();
                getPath(sb);
                String path = sb.toString();

                final Enumeration<?> pnen = p.propertyNames();
                while (pnen.hasMoreElements())
                {
                    String propKey = (String)pnen.nextElement();
                    if (propKey.startsWith(path))
                    {
                        String subKey = propKey.substring(path.length());
                        // Only load immediate descendants
                        if (subKey.indexOf('.') == -1)
                        {
                            root.put(subKey, p.getProperty(propKey));
                        }
                    }
                }
            }
            catch (IOException e)
            {
                throw new BackingStoreException(e);
            }
        }
    }