mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind: replace {Read,Write}UTF16 with {Read,Write}String for string.
This is to enable more flexible encoding/decoding of Go string. For Java, we use UTF16 to be compatible with java string. For other languages, we will want other way to represent a string. Change-Id: Iccd53e2eea18d37636c3c619d06cb473facef0cd Reviewed-on: https://go-review.googlesource.com/8628 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
committed by
Hyang-Ah Hana Kim
parent
d886eeda27
commit
334412418f
@@ -36,6 +36,7 @@ public class Seq {
|
||||
public native float readFloat32();
|
||||
public native double readFloat64();
|
||||
public native String readUTF16();
|
||||
public String readString() { return readUTF16(); }
|
||||
public native byte[] readByteArray();
|
||||
|
||||
public native void writeInt8(byte v);
|
||||
@@ -47,6 +48,7 @@ public class Seq {
|
||||
public native void writeFloat32(float v);
|
||||
public native void writeFloat64(double v);
|
||||
public native void writeUTF16(String v);
|
||||
public void writeString(String v) { writeUTF16(v); }
|
||||
public native void writeByteArray(byte[] v);
|
||||
|
||||
public void writeRef(Ref ref) {
|
||||
|
||||
Reference in New Issue
Block a user