Class URLPathDecoder

java.lang.Object
org.alfresco.officeservices.testclient.util.URLPathDecoder

public class URLPathDecoder extends Object
This class is similar to the well known java.net.URLDecoder, but it does decode the slightly different URL path instead of the application/x-www-form-urlencoded MIME format.
The single difference is that the plus sign "+" is not converted into the space character.
Since:
2.7
Author:
Stefan Kopf, xaldon Technologies GmbH.
  • Method Details

    • decode

      public static String decode(String s, String encoding) throws UnsupportedEncodingException
      Decodes any consecutive sequences of the form "%xy". The difference between this decoding and the default URLDecoder class is that the plus sign (+) is NOT decoded.
      Some Office™ requests use this encoding scheme instead of x-www-form-urlencoded.
      Parameters:
      s - the String to decode
      encoding - the character encoding to be used
      Returns:
      the newly decoded String
      Throws:
      UnsupportedEncodingException