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:
Hyang-Ah (Hana) Kim
2015-04-09 12:44:56 +00:00
committed by Hyang-Ah Hana Kim
parent d886eeda27
commit 334412418f
11 changed files with 73 additions and 47 deletions
+2
View File
@@ -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) {