org.modeshape.webdav.fromcatalina

## Class URLEncoder

- java.lang.Object
- - org.modeshape.webdav.fromcatalina.URLEncoder

-     public class URLEncoder
      extends Object

  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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static char[]` | `HEXADECIMAL`
    `protected BitSet` | `safeCharacters`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `URLEncoder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSafeCharacter(char c)`
    `String` | `encode(String path)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### HEXADECIMAL

          protected static final char[] HEXADECIMAL

    - #### safeCharacters

          protected BitSet safeCharacters

  - ### Constructor Detail

    - #### URLEncoder

          public URLEncoder()

  - ### Method Detail

    - #### addSafeCharacter

          public void addSafeCharacter(char c)

    - #### encode

          public String encode(String path)

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.