yangys
2024-04-02 1a77b1a7c072b136925d6d73c4d8f017ca016e3a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.qianwen.core.tool.utils;
 
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
import org.springframework.web.util.UriUtils;
 
/* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/utils/UrlUtil.class */
public class UrlUtil extends UriUtils {
    public static String encode(String source) {
        return encode(source, Charsets.UTF_8);
    }
 
    public static String decode(String source) {
        return decode(source, Charsets.UTF_8);
    }
 
    @Deprecated
    public static String encodeURL(String source, Charset charset) {
        return encode(source, charset.name());
    }
 
    @Deprecated
    public static String decodeURL(String source, Charset charset) {
        return decode(source, charset.name());
    }
 
    public static String getPath(String uriStr) {
        try {
            URI uri = new URI(uriStr);
            return uri.getPath();
        } catch (URISyntaxException var3) {
            throw new RuntimeException(var3);
        }
    }
}