HTTP.Response.ReadKeyValue C# (CSharp) Method

ReadKeyValue() private method

private ReadKeyValue ( Stream stream ) : string[]
stream Stream
return string[]
                string[] ReadKeyValue (Stream stream)
                {
                	string line = ReadLine( stream );
			
                	if( line == "" ) {
                		return null;
					} else {
                		var split = line.IndexOf( ':' );
                		if( split == -1 ) {
                			return null;
						}
                		var parts = new string[2];
                		parts[0] = line.Substring(0, split).Trim ();
                		parts[1] = line.Substring(split + 1).Trim ();
                		return parts;
                	}
                }