Java™ Platform
Standard Ed. 8
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
compact1, compact2, compact3
java.net
Class URLEncoder
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods
| Modifier and Type |
Method |
Description |
static String |
encode(String s) |
Deprecated.
The resulting string may vary depending on the platform's
default encoding. Instead, use the encode(String,String)
method to specify the encoding.
|
static String |
encode(String s,
String enc) |
Translates a string into application/x-www-form-urlencoded
format using a specific encoding scheme.
|
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
encode
@Deprecated
public static String encode(String s)
Deprecated. The resulting string may vary depending on the platform's
default encoding. Instead, use the encode(String,String)
method to specify the encoding.
Translates a string into x-www-form-urlencoded
format. This method uses the platform's default encoding
as the encoding scheme to obtain the bytes for unsafe characters.
- Parameters:
s - String to be translated.
- Returns:
- the translated
String.
Java™ Platform
Standard Ed. 8
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.