-
-
[求助]smali 下我想把字符串编码为UTF-8
-
发表于:
2013-1-16 11:22
6252
-
[求助]smali 下我想把字符串编码为UTF-8
源码:我需要把 paramString 增加 .getbytes("utf-8")
public void sendUdp(final String paramString)
{
new Thread(new Runnable()
{
public void run()
{
try
{
UdpSender.this.sendUDP(paramString);
return;
}
catch (Exception localException)
{
while (true)
localException.printStackTrace();
}
}
}).start();
}
smali 代码下我改的好像不对,求助
.method public sendUdp(Ljava/lang/String;)V
.locals 2
.parameter "strSend"
.prologue
.line 48
new-instance v0, Ljava/lang/Thread;
const-string v2, "UTF-8"
invoke-virtual {p1, v2}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
move-result p1
new-instance v1, Lcom/Sooloom/VoiceCtrl/UdpSender$2;
invoke-direct {v1, p0, p1}, Lcom/Sooloom/VoiceCtrl/UdpSender$2;-><init>(Lcom/Sooloom/VoiceCtrl/UdpSender;Ljava/lang/String;)V
invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V
.line 57
invoke-virtual {v0}, Ljava/lang/Thread;->start()V
.line 58
return-void
.end method
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课