FlickrNet.Utils.ReadAsciiString C# (CSharp) Method

ReadAsciiString() static private method

static private ReadAsciiString ( Stream s ) : string
s Stream
return string
        internal static string ReadAsciiString(Stream s)
        {
            int len = ReadInt32(s);
            char[] chars = new char[len];
            for (int i = 0; i < len; i++)
            {
                int c = s.ReadByte();
                if (c == -1)
                    throw new IOException("Unexpected EOF encountered");
                chars[i] = (char) (c & 0x7F);
            }
            return new string(chars);
        }