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

com.blackbirdai.client.util.Encoders Maven / Gradle / Ivy

The newest version!
package com.blackbirdai.client.util;

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

public final class Encoders {
    private static final String UTF_8 = "UTF-8";
    public static String urlEncode(String s) {
        try {
            return URLEncoder.encode(s, UTF_8);
        } catch (UnsupportedEncodingException e) {
            // NOTE: This should never happen
            throw new RuntimeException("UTF-8 is not supported by java.io.URLEncoder", e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy