public void TestGetPrefixedString() { IoBuffer buf = IoBuffer.Allocate(16); Encoding encoding = Encoding.GetEncoding("ISO-8859-1"); buf.PutInt16((short)3); buf.PutString("ABCD", encoding); buf.Clear(); Assert.AreEqual("ABC", buf.GetPrefixedString(encoding)); }
/// <inheritdoc/> public override IoBuffer PutInt16(Int16 value) { _buf.PutInt16(value); return(this); }
public static void WritePrimitive(IoBuffer buffer, short value) { buffer.PutInt16(value); }