-
-
[求助]smali 下我想把字符串编码为UTF-8
-
发表于:
2013-1-16 11:22
6265
-
[求助]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
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!