JavaScript is disabled on your browser.
Apache Tomcat® 9.0.87.redhat-00005
java.lang.Object
org.apache.catalina.util.URLEncoder
All Implemented Interfaces:
java.lang.Cloneable
public final class URLEncoder
extends java.lang.Object
implements java.lang.Cloneable
This class is very similar to the java.net.URLEncoder class.
Unfortunately, with java.net.URLEncoder there is no way to specify to the
java.net.URLEncoder which characters should NOT be encoded.
This code was moved from DefaultServlet.java
Author:
Craig R. McClanahan, Remy Maucherat
Constructor Summary
Constructors
Constructor and Description
URLEncoder ()
Method Summary
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
URLEncoder
public URLEncoder()
Method Detail
encode
public java.lang.String encode(java.lang.String path,
java.nio.charset.Charset charset)
URL encodes the provided path using the given character set.
Parameters:
path - The path to encode
charset - The character set to use to convert the path to bytes
Returns:
The encoded path
Apache Tomcat® 9.0.87.redhat-00005
Copyright © 2000-2024 Apache Software Foundation. Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo are either registered trademarks or trademarks of the Apache Software Foundation.