use of jcog.data.string.Utf8Writer in project narchy by automenta.
the class IO method writeUTF8WithPreLen.
// public static void writeUTF8(String s, DataOutput o) throws IOException {
// new Utf8Writer(o).write(s);
// }
public static void writeUTF8WithPreLen(String s, DataOutput o) throws IOException {
DynBytes d = new DynBytes(s.length());
new Utf8Writer(d).write(s);
o.writeShort(d.length());
d.appendTo(o);
}
Aggregations