diff options
author | Michael Koch <mkoch@gcc.gnu.org> | 2002-09-25 05:05:07 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2002-09-25 05:05:07 +0000 |
commit | ed08cfe4cd05b81e9dbdf33866c8e292a424fb67 (patch) | |
tree | 39ea9a29a7413c3343fed19100ab8885a7a52d60 /libjava/java/net/URLDecoder.java | |
parent | 95ddd785f615b57b28764a3466b9cb167512a414 (diff) | |
download | gcc-ed08cfe4cd05b81e9dbdf33866c8e292a424fb67.zip gcc-ed08cfe4cd05b81e9dbdf33866c8e292a424fb67.tar.gz gcc-ed08cfe4cd05b81e9dbdf33866c8e292a424fb67.tar.bz2 |
2002-09-25 Michael Koch <konqueror@gmx.de>
* java/net/DatagramPacket
(DatagramPacket): Exception documentation added.
(setData): Likewise.
(setSocketAddress): Likewise.
* java/net/DatagramSocketImpl.java
(peek): Documentation addded.
(peekData): Documentation addded.
(send): Documentation addded.
(receive): Documentation addded.
(connect): New method.
(disconnect): New method.
(joinGroup): New abstract method.
(leaveGroup): New abstract method.
* java/net/InetSocketAddress.java
(InetSocketAddress): Documentation added.
(equals): final keyword added.
(getAddress): final keyword added.
(getHostName): final keyword added.
(getPort): final keyword added.
(hashCode): final keyword added.
(isUnresolved): final keyword added.
* java/net/MulticastSocket.java
(MulticastSocket): Documentation added.
(MulticastSocket): New method.
(joinGroup): Documentation added.
(joinGroup): New method.
(leaveGroup): Documentation added.
(leaveGroup): New method.
(send): Documentation added.
* java/net/NetworkInterface.java
(getByName): Documentation added.
(getByInetAddress): Documentation added.
(getNetworkInterfaces): Documentation added.
* java/net/PlainDatagramSocketImpl.java
(connect): New method.
(disconnect): New method.
* java/net/SocketImpl.java
(create): Documentation added.
(shutdownInput): Convert public to protected, as it always was.
(shutdownOutput): Convert public to protected, as it always was.
* java/net/SocketOptions.java
(whole file): Reintented.
* java/net/URLClassLoader.java
(URLClassLoader): SecurityManager check added, documentation added.
(findResources): Documentation added.
(findClass): Documentation added.
(newInstance): More correct method arguments.
* java/net/URLConnection.java
(connect): Documentation added.
(getContent): Documentation added.
(getPermission): Documentation added.
(getInputStream): Documentation added.
(getOutputStream): Documentation added.
(setDoInput): Throw correct exception, documentation added.
(setDoOutput): Throw correct exception, documentation added.
(setAllowUserInteraction): Throw correct exception, documentation added.
(setUseCaches): Throw correct exception, documentation added.
(setIfModifiedSince): Throw correct exception, documentation added.
(setRequestProperty): Throw exception, documentation added.
(addRequestProperty): Throw exception, documentation added.
(getRequestProperty): Throw exception, documentation added.
(getRequestProperties): Documentation added.
(setContentHandlerFactory): Documentation added.
(guessContentTypeFromName): protected to public.
(setFileNameMap): Documentation added.
* java/net/URLDecoder.java
(URLDecoder): New method.
(decode): Documentation added.
(whole file): Reindented.
* java/net/URLEncoder.java
(encode): Documentation added.
* java/net/natPlainDatagramSocketImpl.cc
(connect): New method.
(disconnect): New method.
* javax/naming/RefAddr:
(addrType): addrType was never final.
(equals): Fix typo in method name.
* javax/naming/BinaryRefAddr:
(equals): Fix typo in method name.
From-SVN: r57487
Diffstat (limited to 'libjava/java/net/URLDecoder.java')
-rw-r--r-- | libjava/java/net/URLDecoder.java | 108 |
1 files changed, 59 insertions, 49 deletions
diff --git a/libjava/java/net/URLDecoder.java b/libjava/java/net/URLDecoder.java index 3c15802..8cdcf94 100644 --- a/libjava/java/net/URLDecoder.java +++ b/libjava/java/net/URLDecoder.java @@ -39,38 +39,45 @@ package java.net; import java.io.UnsupportedEncodingException; - /** - * This utility class contains static methods that converts a - * string encoded in the x-www-form-urlencoded format to the original - * text. The x-www-form-urlencoded format replaces certain disallowed - * characters with encoded equivalents. All upper case and lower case - * letters in the US alphabet remain as is, the space character (' ') - * is replaced with '+' sign, and all other characters are converted to a - * "%XX" format where XX is the hexadecimal representation of that character - * in a given character encoding (default is "UTF-8"). - * <p> - * This method is very useful for decoding strings sent to CGI scripts - * - * Written using on-line Java Platform 1.2/1.4 API Specification. - * Status: Believed complete and correct. - * - * @since 1.2 - * - * @author Warren Levy <warrenl@cygnus.com> - * @author Aaron M. Renn (arenn@urbanophile.com) (documentation comments) - * @author Mark Wielaard (mark@klomp.org) - */ +/** + * This utility class contains static methods that converts a + * string encoded in the x-www-form-urlencoded format to the original + * text. The x-www-form-urlencoded format replaces certain disallowed + * characters with encoded equivalents. All upper case and lower case + * letters in the US alphabet remain as is, the space character (' ') + * is replaced with '+' sign, and all other characters are converted to a + * "%XX" format where XX is the hexadecimal representation of that character + * in a given character encoding (default is "UTF-8"). + * <p> + * This method is very useful for decoding strings sent to CGI scripts + * + * Written using on-line Java Platform 1.2/1.4 API Specification. + * Status: Believed complete and correct. + * + * @since 1.2 + * + * @author Warren Levy <warrenl@cygnus.com> + * @author Aaron M. Renn (arenn@urbanophile.com) (documentation comments) + * @author Mark Wielaard (mark@klomp.org) + */ public class URLDecoder { - /** - * This method translates the passed in string from x-www-form-urlencoded - * format using the default encoding "UTF-8" to decode the hex encoded - * unsafe characters. - * - * @param s the String to convert - * - * @return the converted String - */ + /** + * Constructor for compatibility with Sun's JDK. + */ + public URLDecoder () + { + } + + /** + * This method translates the passed in string from x-www-form-urlencoded + * format using the default encoding "UTF-8" to decode the hex encoded + * unsafe characters. + * + * @param s the String to convert + * + * @return the converted String + */ public static String decode(String s) { try @@ -84,25 +91,28 @@ public class URLDecoder } } - /** - * This method translates the passed in string from x-www-form-urlencoded - * format using the given character encoding to decode the hex encoded - * unsafe characters. - * <p> - * This implementation will decode the string even if it contains - * unsafe characters (characters that should have been encoded) or if the - * two characters following a % do not represent a hex encoded byte. - * In those cases the unsafe character or the % character will be added - * verbatim to the decoded result. - * - * @param s the String to convert - * @param encoding the character encoding to use the decode the hex encoded - * unsafe characters - * - * @return the converted String - * - * @since 1.4 - */ + /** + * This method translates the passed in string from x-www-form-urlencoded + * format using the given character encoding to decode the hex encoded + * unsafe characters. + * + * This implementation will decode the string even if it contains + * unsafe characters (characters that should have been encoded) or if the + * two characters following a % do not represent a hex encoded byte. + * In those cases the unsafe character or the % character will be added + * verbatim to the decoded result. + * + * @param s the String to convert + * @param encoding the character encoding to use the decode the hex encoded + * unsafe characters + * + * @return the converted String + * + * @exception UnsupportedEncodingException If the named encoding is not + * supported + * + * @since 1.4 + */ public static String decode(String s, String encoding) throws UnsupportedEncodingException { |