| java.lang.Object java.util.prefs.XmlSupport
XmlSupport | class XmlSupport (Code) | | XML Support for java.util.prefs. Methods to import and export preference
nodes and subtrees.
author: Josh Bloch and Mark Reinhold version: 1.17, 05/05/07 See Also: Preferences since: 1.4 |
Method Summary | |
static void | export(OutputStream os, Preferences p, boolean subTree) Export the specified preferences node and, if subTree is true, all
subnodes, to the specified output stream. | static void | exportMap(OutputStream os, Map map) Export the specified Map to a map document on
the specified OutputStream as per the prefs DTD. | static void | importMap(InputStream is, Map m) Import Map from the specified input stream, which is assumed
to contain a map document as per the prefs DTD. | static void | importPreferences(InputStream is) Import preferences from the specified input stream, which is assumed
to contain an XML document in the format described in the Preferences
spec. |
exportMap | static void exportMap(OutputStream os, Map map) throws IOException(Code) | | Export the specified Map to a map document on
the specified OutputStream as per the prefs DTD. This is used
as the internal (undocumented) format for FileSystemPrefs.
throws: IOException - if writing to the specified output streamresults in an IOException. |
importMap | static void importMap(InputStream is, Map m) throws IOException, InvalidPreferencesFormatException(Code) | | Import Map from the specified input stream, which is assumed
to contain a map document as per the prefs DTD. This is used
as the internal (undocumented) format for FileSystemPrefs. The
key-value pairs specified in the XML document will be put into
the specified Map. (If this Map is empty, it will contain exactly
the key-value pairs int the XML-document when this method returns.)
throws: IOException - if reading from the specified output streamresults in an IOException. throws: InvalidPreferencesFormatException - Data on input stream does notconstitute a valid XML document with the mandated document type. |
|
|