src/share/classes/java/util/prefs/Preferences.java
Print this page
@@ -132,56 +132,56 @@
* preferences to be "imported" back into the system. This facility
* may be used to back up all or part of a preference tree, and
* subsequently restore from the backup.
*
* <p>The XML document has the following DOCTYPE declaration:
- * <pre>
- * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
- * </pre>
+ * <pre>{@code
+ * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
+ * }</pre>
* Note that the system URI (http://java.sun.com/dtd/preferences.dtd) is
* <i>not</i> accessed when exporting or importing preferences; it merely
* serves as a string to uniquely identify the DTD, which is:
- * <pre>
- * <?xml version="1.0" encoding="UTF-8"?>
+ * <pre>{@code
+ * <?xml version="1.0" encoding="UTF-8"?>
*
- * <!-- DTD for a Preferences tree. -->
+ * <!-- DTD for a Preferences tree. -->
*
- * <!-- The preferences element is at the root of an XML document
- * representing a Preferences tree. -->
- * <!ELEMENT preferences (root)>
- *
- * <!-- The preferences element contains an optional version attribute,
- * which specifies version of DTD. -->
- * <!ATTLIST preferences EXTERNAL_XML_VERSION CDATA "0.0" >
- *
- * <!-- The root element has a map representing the root's preferences
- * (if any), and one node for each child of the root (if any). -->
- * <!ELEMENT root (map, node*) >
- *
- * <!-- Additionally, the root contains a type attribute, which
- * specifies whether it's the system or user root. -->
- * <!ATTLIST root
- * type (system|user) #REQUIRED >
- *
- * <!-- Each node has a map representing its preferences (if any),
- * and one node for each child (if any). -->
- * <!ELEMENT node (map, node*) >
- *
- * <!-- Additionally, each node has a name attribute -->
- * <!ATTLIST node
- * name CDATA #REQUIRED >
- *
- * <!-- A map represents the preferences stored at a node (if any). -->
- * <!ELEMENT map (entry*) >
- *
- * <!-- An entry represents a single preference, which is simply
- * a key-value pair. -->
- * <!ELEMENT entry EMPTY >
- * <!ATTLIST entry
+ * <!-- The preferences element is at the root of an XML document
+ * representing a Preferences tree. -->
+ * <!ELEMENT preferences (root)>
+ *
+ * <!-- The preferences element contains an optional version attribute,
+ * which specifies version of DTD. -->
+ * <!ATTLIST preferences EXTERNAL_XML_VERSION CDATA "0.0" >
+ *
+ * <!-- The root element has a map representing the root's preferences
+ * (if any), and one node for each child of the root (if any). -->
+ * <!ELEMENT root (map, node*) >
+ *
+ * <!-- Additionally, the root contains a type attribute, which
+ * specifies whether it's the system or user root. -->
+ * <!ATTLIST root
+ * type (system|user) #REQUIRED >
+ *
+ * <!-- Each node has a map representing its preferences (if any),
+ * and one node for each child (if any). -->
+ * <!ELEMENT node (map, node*) >
+ *
+ * <!-- Additionally, each node has a name attribute -->
+ * <!ATTLIST node
+ * name CDATA #REQUIRED >
+ *
+ * <!-- A map represents the preferences stored at a node (if any). -->
+ * <!ELEMENT map (entry*) >
+ *
+ * <!-- An entry represents a single preference, which is simply
+ * a key-value pair. -->
+ * <!ELEMENT entry EMPTY >
+ * <!ATTLIST entry
* key CDATA #REQUIRED
- * value CDATA #REQUIRED >
- * </pre>
+ * value CDATA #REQUIRED >
+ * }</pre>
*
* Every <tt>Preferences</tt> implementation must have an associated {@link
* PreferencesFactory} implementation. Every Java(TM) SE implementation must provide
* some means of specifying which <tt>PreferencesFactory</tt> implementation
* is used to generate the root preferences nodes. This allows the
@@ -1159,13 +1159,13 @@
* Emits on the specified output stream an XML document representing all
* of the preferences contained in this node (but not its descendants).
* This XML document is, in effect, an offline backup of the node.
*
* <p>The XML document will have the following DOCTYPE declaration:
- * <pre>
- * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
- * </pre>
+ * <pre>{@code
+ * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
+ * }</pre>
* The UTF-8 character encoding will be used.
*
* <p>This method is an exception to the general rule that the results of
* concurrently executing multiple methods in this class yields
* results equivalent to some serial execution. If the preferences
@@ -1190,13 +1190,13 @@
* Emits an XML document representing all of the preferences contained
* in this node and all of its descendants. This XML document is, in
* effect, an offline backup of the subtree rooted at the node.
*
* <p>The XML document will have the following DOCTYPE declaration:
- * <pre>
- * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
- * </pre>
+ * <pre>{@code
+ * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
+ * }</pre>
* The UTF-8 character encoding will be used.
*
* <p>This method is an exception to the general rule that the results of
* concurrently executing multiple methods in this class yields
* results equivalent to some serial execution. If the preferences
@@ -1226,13 +1226,13 @@
* originally came from a different user's preference tree). If any of
* the preferences described by the document inhabit preference nodes that
* do not exist, the nodes will be created.
*
* <p>The XML document must have the following DOCTYPE declaration:
- * <pre>
- * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
- * </pre>
+ * <pre>{@code
+ * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
+ * }</pre>
* (This method is designed for use in conjunction with
* {@link #exportNode(OutputStream)} and
* {@link #exportSubtree(OutputStream)}.
*
* <p>This method is an exception to the general rule that the results of