Beispiel #1
0
        public String ReadString()
        {
            if (this.IsComplete(sizeof(byte)))
            {
                return("");
            }
            byte nLen = read.ReadByte();
            byte hi_  = read.ReadByte();

            if (hi_ > 0)
            {
                nLen = (byte)MAKEWORD(nLen, hi_);
            }
            if (this.IsComplete(nLen))
            {
                return("");
            }
            byte[] buf = read.ReadBytes(nLen);
            read.ReadByte(); //补位
            return(Coding.GetUtf8Coding().GetString(buf));
        }