package edu.prlab.tyler.iotgateway.cloud.util;

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

public class CodeTools {
    private CodeTools() {
    }

    public static String encode(String url) {
        try {
            String encodeURL = URLEncoder.encode(url, "UTF-8");
            return encodeURL;
        } catch (UnsupportedEncodingException e) {
            return "Error: " + e.getMessage();
        }
    }

}
