
com.qiniu.util.URLUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qsuits Show documentation
Show all versions of qsuits Show documentation
qiniu-suits is a efficient tools for qiniu api implemented by java8.
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