Example usage for org.apache.wicket.util.encoding UrlDecoder PATH_INSTANCE

List of usage examples for org.apache.wicket.util.encoding UrlDecoder PATH_INSTANCE

Introduction

In this page you can find the example usage for org.apache.wicket.util.encoding UrlDecoder PATH_INSTANCE.

Prototype

UrlDecoder PATH_INSTANCE

To view the source code for org.apache.wicket.util.encoding UrlDecoder PATH_INSTANCE.

Click Source Link

Document

Encoder used to decode components of a path.<br/> <br/> For example: http://org.acme/foo/thispart/orthispart?butnot=thispart

Usage

From source file:org.hippoecm.frontend.plugins.richtext.RichTextUtil.java

License:Apache License

public static final String decode(String path) {
    String[] elements = StringUtils.split(path, '/');
    for (int i = 0; i < elements.length; i++) {
        elements[i] = UrlDecoder.PATH_INSTANCE.decode(elements[i], "UTF-8");
    }/*from ww  w .  ja v  a 2  s  .  co m*/
    return StringUtils.join(elements, '/');
}