jdk/src/share/classes/java/net/URLEncoder.java
changeset 19069 1d9cb0d080e3
parent 5506 202f599c92aa
child 21334 c60dfce46a77
child 21278 ef8a3a2a72f2
--- a/jdk/src/share/classes/java/net/URLEncoder.java	Mon Jul 29 19:36:54 2013 -0700
+++ b/jdk/src/share/classes/java/net/URLEncoder.java	Tue Jul 30 11:04:19 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,19 +51,19 @@
  *
  * <p>
  * <ul>
- * <li>The alphanumeric characters &quot;<code>a</code>&quot; through
- *     &quot;<code>z</code>&quot;, &quot;<code>A</code>&quot; through
- *     &quot;<code>Z</code>&quot; and &quot;<code>0</code>&quot;
- *     through &quot;<code>9</code>&quot; remain the same.
- * <li>The special characters &quot;<code>.</code>&quot;,
- *     &quot;<code>-</code>&quot;, &quot;<code>*</code>&quot;, and
- *     &quot;<code>_</code>&quot; remain the same.
- * <li>The space character &quot;<code>&nbsp;</code>&quot; is
- *     converted into a plus sign &quot;<code>+</code>&quot;.
+ * <li>The alphanumeric characters &quot;{@code a}&quot; through
+ *     &quot;{@code z}&quot;, &quot;{@code A}&quot; through
+ *     &quot;{@code Z}&quot; and &quot;{@code 0}&quot;
+ *     through &quot;{@code 9}&quot; remain the same.
+ * <li>The special characters &quot;{@code .}&quot;,
+ *     &quot;{@code -}&quot;, &quot;{@code *}&quot;, and
+ *     &quot;{@code _}&quot; remain the same.
+ * <li>The space character &quot; &nbsp; &quot; is
+ *     converted into a plus sign &quot;{@code +}&quot;.
  * <li>All other characters are unsafe and are first converted into
  *     one or more bytes using some encoding scheme. Then each byte is
  *     represented by the 3-character string
- *     &quot;<code>%<i>xy</i></code>&quot;, where <i>xy</i> is the
+ *     &quot;<i>{@code %xy}</i>&quot;, where <i>xy</i> is the
  *     two-digit hexadecimal representation of the byte.
  *     The recommended encoding scheme to use is UTF-8. However,
  *     for compatibility reasons, if an encoding is not specified,
@@ -152,15 +152,15 @@
     private URLEncoder() { }
 
     /**
-     * Translates a string into <code>x-www-form-urlencoded</code>
+     * Translates a string into {@code x-www-form-urlencoded}
      * format. This method uses the platform's default encoding
      * as the encoding scheme to obtain the bytes for unsafe characters.
      *
-     * @param   s   <code>String</code> to be translated.
+     * @param   s   {@code String} to be translated.
      * @deprecated The resulting string may vary depending on the platform's
      *             default encoding. Instead, use the encode(String,String)
      *             method to specify the encoding.
-     * @return  the translated <code>String</code>.
+     * @return  the translated {@code String}.
      */
     @Deprecated
     public static String encode(String s) {
@@ -177,7 +177,7 @@
     }
 
     /**
-     * Translates a string into <code>application/x-www-form-urlencoded</code>
+     * Translates a string into {@code application/x-www-form-urlencoded}
      * format using a specific encoding scheme. This method uses the
      * supplied encoding scheme to obtain the bytes for unsafe
      * characters.
@@ -188,11 +188,11 @@
      * UTF-8 should be used. Not doing so may introduce
      * incompatibilites.</em>
      *
-     * @param   s   <code>String</code> to be translated.
+     * @param   s   {@code String} to be translated.
      * @param   enc   The name of a supported
      *    <a href="../lang/package-summary.html#charenc">character
      *    encoding</a>.
-     * @return  the translated <code>String</code>.
+     * @return  the translated {@code String}.
      * @exception  UnsupportedEncodingException
      *             If the named encoding is not supported
      * @see URLDecoder#decode(java.lang.String, java.lang.String)