optimize
This commit is contained in:
@@ -1,16 +1,10 @@
|
|||||||
package kinosearch.core;
|
package kinosearch.core;
|
||||||
|
|
||||||
import kinosearch.core.warez.KinoWarez;
|
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class Tools {
|
public class Tools {
|
||||||
public static final String VERSION = "2.0.7с";
|
|
||||||
private static Set<KinoWarez> kinoWarezSet;
|
|
||||||
|
|
||||||
public static String SafeUrlEncode(String string, String encode) {
|
public static String SafeUrlEncode(String string, String encode) {
|
||||||
try {
|
try {
|
||||||
return URLEncoder.encode(string, encode);
|
return URLEncoder.encode(string, encode);
|
||||||
@@ -19,19 +13,6 @@ public class Tools {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFileFromURI(String uri, String context) {
|
|
||||||
if (context == null || context.isEmpty()) {
|
|
||||||
return uri;
|
|
||||||
} else {
|
|
||||||
String[] strArr = uri.split(context);
|
|
||||||
if (strArr.length < 2) {
|
|
||||||
return uri;
|
|
||||||
} else {
|
|
||||||
return strArr[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SafeSleep(long ms) {
|
public static void SafeSleep(long ms) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(ms);
|
Thread.sleep(ms);
|
||||||
|
|||||||
Reference in New Issue
Block a user