Skip to content

Commit

Permalink
byteArrayToStringStudy
Browse files Browse the repository at this point in the history
  • Loading branch information
郭钟 committed Jun 10, 2021
1 parent dcc68b5 commit 963299d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,10 @@ function sleep(time) {
while(new Date().getTime() < startTime) {}
};

//byte数组转String,这个方法不能直接调,把方法逻辑内嵌到你的方法体。这里只是展示语法,告诉你怎么转
function byteArrayToStringStudy() {
var bytes = null;//假如bytes是一个java的byte[]
var JavaString = Java.use("java.lang.String");//声明java类
var result = JavaString.$new(decryptData, "utf-8");//result就是java的String
}

0 comments on commit 963299d

Please sign in to comment.