Пример #1
0
        public string ReadString()
        {
            var count = Read16();
            var bytes = ReadBlock(count);

            return(JavaUtf8.Decode(bytes, Where));
        }
Пример #2
0
        public void WriteString(string v)
        {
            var bytes = JavaUtf8.Encode(v);
            int count = bytes.Length;

            if (count > 65535)
            {
                throw Where.Exception("string too long");
            }
            Write16((ushort)count);
            WriteBlock(bytes);
        }