function decodeStream( $request, $stream, $headers=false, $cookies=array(), $statuscode="200" )
    {
        $this->decodeStreamCommon( $request, $stream, $headers, $cookies, $statuscode );

        /// @todo refuse bad content-types?

        /// @todo test if this automatically groks encoding from xml or not...
        $results = xmlrpc_decode( $stream );

        if ( $results === null )
        {
            // invalid XMLRPC response
            $this->IsFault = true;
            $this->FaultCode = self::INVALIDRESPONSEERROR;
            $this->FaultString = self::INVALIDRESPONSESTRING;
        }
        else
        {

            if ( !is_array( $results ) || count( $results ) != 2 || !isset( $results['faultCode'] ) || !isset( $results['faultString'] ) )
            {
                $this->Value = $results;
            }
            else
            {
                $this->IsFault = true;
                $this->FaultCode = $results['faultCode'];
                $this->FaultString = $results['faultString'];
            }
        }
    }