- URLEncoder Class
- Remarks
- Constructors
- Properties
- Methods
- Explicit Interface Implementations
- Extension Methods
- Class URLEncoder
- Method Summary
- Methods declared in class java.lang.Object
- Method Details
- encode
- encode
- encode
- What is java net urlencoder
- Methods inherited from class java.lang.Object
- Method Detail
- encode
- encode
- What is java net urlencoder
- Methods inherited from class java.lang.Object
- Method Detail
- encode
- encode
- What is java net urlencoder
- Method Summary
- Methods declared in class java.lang.Object
- Method Detail
- encode
- encode
- encode
URLEncoder Class
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Utility class for HTML form encoding.
[Android.Runtime.Register("java/net/URLEncoder", DoNotGenerateAcw=true)] public class URLEncoder : Java.Lang.Object
[] type URLEncoder = class inherit Object
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
A constructor used when creating managed representations of JNI objects; called by the runtime.
Properties
Returns the runtime class of this Object .
The handle to the underlying Android instance.
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
Methods
Creates and returns a copy of this object.
Translates a string into x-www-form-urlencoded format.
Translates a string into application/x-www-form-urlencoded format using a specific java.
Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme.
Indicates whether some other object is «equal to» this one.
Returns a hash code value for the object.
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
Wakes up a single thread that is waiting on this object’s monitor.
Wakes up all threads that are waiting on this object’s monitor.
Returns a string representation of the object.
Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.
Causes the current thread to wait until either another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or a specified amount of time has elapsed.
Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
Performs an Android runtime-checked type conversion.
Class URLEncoder
Utility class for HTML form encoding. This class contains static methods for converting a String to the application/x-www-form-urlencoded MIME format. For more information about HTML form encoding, consult the HTML specification.
- The alphanumeric characters » a » through » z «, » A » through » Z » and » 0 » through » 9 » remain the same.
- The special characters » . «, » — «, » * «, and » _ » remain the same.
- The space character » » is converted into a plus sign » + «.
- 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 » %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, then the default charset is used.
For example using UTF-8 as the encoding scheme the string «The string ü@foo-bar» would get converted to «The+string+%C3%BC%40foo-bar» because in UTF-8 the character ü is encoded as two bytes C3 (hex) and BC (hex), and the character @ is encoded as one byte 40 (hex).
Method Summary
Methods declared in class java.lang.Object
Method Details
encode
The resulting string may vary depending on the default charset. Instead, use the encode(String,String) method to specify the encoding.
Translates a string into x-www-form-urlencoded format. This method uses the default charset as the encoding scheme to obtain the bytes for unsafe characters.
encode
Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme. This method behaves the same as encode(String s, Charset charset) except that it will look up the charset using the given encoding name.
encode
Translates a string into application/x-www-form-urlencoded format using a specific Charset. This method uses the supplied charset to obtain the bytes for unsafe characters. Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilities.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.
What is java net urlencoder
The resulting string may vary depending on the platform’s default encoding. Instead, use the encode(String,String) method to specify the encoding.
Methods inherited from class java.lang.Object
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.
encode
public static String encode(String s, String enc) throws UnsupportedEncodingException
Translates a string into 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. Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilities.
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, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
What is java net urlencoder
The resulting string may vary depending on the platform’s default encoding. Instead, use the encode(String,String) method to specify the encoding.
Methods inherited from class java.lang.Object
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.
encode
public static String encode(String s, String enc) throws UnsupportedEncodingException
Translates a string into 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. Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilities.
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, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
What is java net urlencoder
For example using UTF-8 as the encoding scheme the string «The string ü@foo-bar» would get converted to «The+string+%C3%BC%40foo-bar» because in UTF-8 the character ü is encoded as two bytes C3 (hex) and BC (hex), and the character @ is encoded as one byte 40 (hex).
Method Summary
Methods declared in class java.lang.Object
Method Detail
encode
@Deprecated public static String encode(String s)
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.
encode
public static String encode(String s, String enc) throws UnsupportedEncodingException
Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme. This method behaves the same as encode(java.lang.String,java.nio.charset.Charset) except that it will look up the charset using the given encoding name.
encode
public static String encode(String s, Charset charset)
Translates a string into application/x-www-form-urlencoded format using a specific Charset. This method uses the supplied charset to obtain the bytes for unsafe characters. Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilities.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.