|
|
|
|
@ -20,6 +20,7 @@ import com.whl.quickjs.wrapper.QuickJSContext; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.lang.reflect.Method; |
|
|
|
|
import java.net.URLEncoder; |
|
|
|
|
import java.nio.charset.CharacterCodingException; |
|
|
|
|
import java.util.Timer; |
|
|
|
|
import java.util.TimerTask; |
|
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
|
@ -147,6 +148,14 @@ public class Global { |
|
|
|
|
return parser.joinUrl(parent, child); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Keep |
|
|
|
|
@JSMethod |
|
|
|
|
public String gbkDecode(JSArray buffer) throws CharacterCodingException { |
|
|
|
|
String result = JSUtil.decodeTo("GB2312", buffer); |
|
|
|
|
Logger.t("gbkDecode").d("text:%s\nresult:\n%s", buffer, result); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Keep |
|
|
|
|
@JSMethod |
|
|
|
|
public String md5X(String text) { |
|
|
|
|
|