-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
java
public JSObject getMsg() {
JSObject data = context.createNewJSObject();
byte[] buffer = new byte[]{31, -117, 8, 0, 0, 0, 0, 0, 0, -1, 109, -112, 79, 79, -125, 64, 20, -60, -65, 11, -90, 55, -17, -20, -82, -91, -48, 27, -108, 63, -59, -12, -45, 98, -128, 10};
data.setProperty("msg", new String(buffer, StandardCharsets.UTF_8));
return data;
}
public void test(String text, int length) {
int len = text.length();
byte[] buffer = text.getBytes(StandardCharsets.UTF_8);
int len2 = buffer.length;
}
js
const data = getMsg()
console.log(data)
test(data.msg, data.msg.length)
Metadata
Metadata
Assignees
Labels
No labels