Encog.Cloud.CloudRequest.HandleResponse C# (CSharp) Method

HandleResponse() private method

Handle the cloud response.
private HandleResponse ( String contents ) : void
contents String The contents.
return void
        private void HandleResponse(String contents)
        {
            byte[] bin = System.Text.Encoding.GetEncoding("iso-8859-1").GetBytes(contents);
            MemoryStream istream = new MemoryStream(bin);
            ReadXML xml = new ReadXML(istream);
            int ch;

            while ((ch = xml.Read()) != -1)
            {
                if (ch == 0)
                {
                    if (xml.LastTag.Name.Equals("EncogCloud"))
                    {
                        ProcessCloud(xml);
                    }
                }
            }

            if ((Status == null) || Status.Equals("failed"))
            {
                throw new EncogCloudError(Message);
            }
        }