XenAPI.HTTP.ReadLine C# (CSharp) 메소드

ReadLine() 개인적인 정적인 메소드

private static ReadLine ( Stream stream ) : string
stream Stream
리턴 string
        private static string ReadLine(Stream stream)
        {
            System.Text.StringBuilder result = new StringBuilder();
            while (true)
            {
                int b = stream.ReadByte();
                if (b == -1)
                    throw new EndOfStreamException();
                char c = Convert.ToChar(b);
                result.Append(c);
                if (c == '\n')
                    return result.ToString();
            }
        }