diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/URLEncoder.java --- 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 @@ * *
*
a
" through
- * "z
", "A
" through
- * "Z
" and "0
"
- * through "9
" remain the same.
- * .
",
- * "-
", "*
", and
- * "_
" remain the same.
- *
" is
- * converted into a plus sign "+
".
+ * %xy
", where xy is the
+ * "{@code %xy}", where xy 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 x-www-form-urlencoded
+ * 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 String
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 String
.
+ * @return the translated {@code String}.
*/
@Deprecated
public static String encode(String s) {
@@ -177,7 +177,7 @@
}
/**
- * Translates a string into application/x-www-form-urlencoded
+ * 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.
*
- * @param s String
to be translated.
+ * @param s {@code String} to be translated.
* @param enc The name of a supported
* character
* encoding.
- * @return the translated String
.
+ * @return the translated {@code String}.
* @exception UnsupportedEncodingException
* If the named encoding is not supported
* @see URLDecoder#decode(java.lang.String, java.lang.String)