Esempio n. 1
0
        public string ReadAsdaString(int len, Locale locale)
        {
            List <byte> byteList = new List <byte>();
            byte        num;

            while ((num = ReadByte()) != 0)
            {
                byteList.Add(num);
            }
            if (byteList.Count < len)
            {
                Position += len - byteList.Count - 1;
            }
            return(Asda2EncodingHelper.Decode(byteList.ToArray(), locale));
        }
Esempio n. 2
0
        public string ReadAsdaString(int len, Locale locale)
        {
            //todo asda2 Read string as client locale
            byte tempByte;
            var  chrBuffer = new List <byte>();

            while ((tempByte = ReadByte()) != 0)
            {
                chrBuffer.Add(tempByte);
            }
            if (chrBuffer.Count < len)
            {
                Position += len - chrBuffer.Count - 1;
            }
            return(Asda2EncodingHelper.Decode(chrBuffer.ToArray(), locale));
        }
Esempio n. 3
0
        public string ReadAsciiString(Locale locale)
        {//todo asda2 Read string as client locale
            byte tempByte;
            var  chrBuffer = new List <byte>();

            try
            {
                while ((tempByte = ReadByte()) != 0)
                {
                    chrBuffer.Add(tempByte);
                }
            }
            catch (EndOfStreamException) {}

            return(Asda2EncodingHelper.Decode(chrBuffer.ToArray(), locale));
        }
Esempio n. 4
0
        public string ReadAsciiString(Locale locale)
        {
            List <byte> byteList = new List <byte>();

            try
            {
                byte num;
                while ((num = ReadByte()) != 0)
                {
                    byteList.Add(num);
                }
            }
            catch (EndOfStreamException ex)
            {
            }

            return(Asda2EncodingHelper.Decode(byteList.ToArray(), locale));
        }