All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cyberark.conjur.util.EncodeUriComponent Maven / Gradle / Ivy

There is a newer version: 3.0.5
Show newest version
package com.cyberark.conjur.util;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 * Helper to encode URI components without checked exceptions
 */
public class EncodeUriComponent {
    public static String encodeUriComponent(String uriComponent){
        try {
            return URLEncoder.encode(uriComponent, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException("WTF UTF-8 encoding is not supported?");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy