Example #1
0
        public string GetNullTerminatedString(long pos)
        {
            this.pos = pos;
            if (pos != br.BaseStream.Position)
            {
                br.BaseStream.Seek(pos, SeekOrigin.Begin);
            }

            TesBytes bytes = new TesBytes();
            byte     b;

            do
            {
                b = br.ReadByte();
                bytes.Add(b);
                ++pos;
            }while (b != 0x00 && pos < len);

            string result = bytes.ToString();

            return(result);
        }