mirror of
https://github.com/revanced/jadb.git
synced 2025-02-11 01:26:47 +01:00
Allow multi-byte characters in payload
This commit is contained in:
parent
075f29dd82
commit
1519b31162
@ -19,8 +19,9 @@ public class SyncTransport {
|
|||||||
public void send(String syncCommand, String name) throws IOException {
|
public void send(String syncCommand, String name) throws IOException {
|
||||||
if (syncCommand.length() != 4) throw new IllegalArgumentException("sync commands must have length 4");
|
if (syncCommand.length() != 4) throw new IllegalArgumentException("sync commands must have length 4");
|
||||||
output.writeBytes(syncCommand);
|
output.writeBytes(syncCommand);
|
||||||
output.writeInt(Integer.reverseBytes(name.length()));
|
byte[] data = name.getBytes();
|
||||||
output.writeBytes(name);
|
output.writeInt(Integer.reverseBytes(data.length));
|
||||||
|
output.write(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendStatus(String statusCode, int length) throws IOException {
|
public void sendStatus(String statusCode, int length) throws IOException {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user