Build 1.0_r1(from source)

java.util.prefs
Class XMLParser

java.lang.Object
  extended by java.util.prefs.XMLParser

 class XMLParser
extends Object

Utility class for the Preferences import/export from XML file.


Field Summary
(package private) static String DOCTYPE
           
(package private) static String HEADER
           
(package private) static String PREFS_DTD
           
(package private) static String PREFS_DTD_NAME
           
 
Method Summary
(package private) static void exportPrefs(Preferences prefs, OutputStream stream, boolean withSubTree)
          utilities for Preferences export
(package private) static void flushFilePrefs(File file, Properties prefs)
           
(package private) static void flushFilePrefsImpl(File file, Properties prefs)
           
(package private) static void importPrefs(InputStream in)
          utilities for Preferences import
(package private) static Properties loadFilePrefs(File file)
          load preferences from file, if cannot load, create a new one FIXME: need lock or not?
(package private) static Properties loadFilePrefsImpl(File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFS_DTD_NAME

static final String PREFS_DTD_NAME
See Also:
Constant Field Values

PREFS_DTD

static final String PREFS_DTD
See Also:
Constant Field Values

HEADER

static final String HEADER
See Also:
Constant Field Values

DOCTYPE

static final String DOCTYPE
See Also:
Constant Field Values
Method Detail

exportPrefs

static void exportPrefs(Preferences prefs,
                        OutputStream stream,
                        boolean withSubTree)
                 throws IOException,
                        BackingStoreException
utilities for Preferences export

Throws:
IOException
BackingStoreException

importPrefs

static void importPrefs(InputStream in)
                 throws IOException,
                        InvalidPreferencesFormatException
utilities for Preferences import

Throws:
IOException
InvalidPreferencesFormatException

loadFilePrefs

static Properties loadFilePrefs(File file)
load preferences from file, if cannot load, create a new one FIXME: need lock or not?

Parameters:
file - the XML file to be read
Returns:
Properties instance which indicates the preferences key-value pairs

loadFilePrefsImpl

static Properties loadFilePrefsImpl(File file)

flushFilePrefs

static void flushFilePrefs(File file,
                           Properties prefs)
                    throws PrivilegedActionException
Parameters:
file -
prefs -
Throws:
PrivilegedActionException

flushFilePrefsImpl

static void flushFilePrefsImpl(File file,
                               Properties prefs)
                        throws IOException
Throws:
IOException

Build 1.0_r1(from source)

Please submit a feedback, bug or feature