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

com.qiniu.util.URLUtils Maven / Gradle / Ivy

There is a newer version: 8.4.8
Show newest version
package com.qiniu.util;

import java.io.IOException;
import java.net.URL;

public class URLUtils {

    public static String getKey(String url) throws IOException {
        if (url != null) {
            URL httpUrl = new URL(url);
            return httpUrl.getPath().startsWith("/") ? httpUrl.getPath().substring(1) : httpUrl.getPath();
        } else {
            throw new IOException("empty url line");
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy