original_string: public function getEncodedStream()
      {
          if (!$this->_isStream) {
              // require_once 'Zend/Mime/Exception.php';
              throw new Zend_Mime_Exception('Attempt to get a stream from a string part');
          }
  
          //stream_filter_remove(); // ??? is that right?
          switch ($this->encoding) {
              case Zend_Mime::ENCODING_QUOTEDPRINTABLE:
                  $filter = stream_filter_append(
                      $this->_content,
                      'convert.quoted-printable-encode',
                      STREAM_FILTER_READ,
                      array(
                          'line-length'      => 76,
                          'line-break-chars' => Zend_Mime::LINEEND
                      )
                  );
                  if (!is_resource($filter)) {
                      // require_once 'Zend/Mime/Exception.php';
                      throw new Zend_Mime_Exception('Failed to append quoted-printable filter');
                  }
                  break;
              case Zend_Mime::ENCODING_BASE64:
                  $filter = stream_filter_append(
                      $this->_content,
                      'convert.base64-encode',
                      STREAM_FILTER_READ,
                      array(
                          'line-length'      => 76,
                          'line-break-chars' => Zend_Mime::LINEEND
                      )
                  );
                  if (!is_resource($filter)) {
                      // require_once 'Zend/Mime/Exception.php';
                      throw new Zend_Mime_Exception('Failed to append base64 filter');
                  }
                  break;
              default:
          }
          return $this->_content;
      }
code: public function getEncodedStream()
      {
          if (!$this->_isStream) {
              // require_once 'Zend/Mime/Exception.php';
              throw new Zend_Mime_Exception('Attempt to get a stream from a string part');
          }
  
          //stream_filter_remove(); // ??? is that right?
          switch ($this->encoding) {
              case Zend_Mime::ENCODING_QUOTEDPRINTABLE:
                  $filter = stream_filter_append(
                      $this->_content,
                      'convert.quoted-printable-encode',
                      STREAM_FILTER_READ,
                      array(
                          'line-length'      => 76,
                          'line-break-chars' => Zend_Mime::LINEEND
                      )
                  );
                  if (!is_resource($filter)) {
                      // require_once 'Zend/Mime/Exception.php';
                      throw new Zend_Mime_Exception('Failed to append quoted-printable filter');
                  }
                  break;
              case Zend_Mime::ENCODING_BASE64:
                  $filter = stream_filter_append(
                      $this->_content,
                      'convert.base64-encode',
                      STREAM_FILTER_READ,
                      array(
                          'line-length'      => 76,
                          'line-break-chars' => Zend_Mime::LINEEND
                      )
                  );
                  if (!is_resource($filter)) {
                      // require_once 'Zend/Mime/Exception.php';
                      throw new Zend_Mime_Exception('Failed to append base64 filter');
                  }
                  break;
              default:
          }
          return $this->_content;
      }
code_tokens: public function getEncodedStream ( ) { if ( ! $ this -> _isStream ) { // require_once 'Zend/Mime/Exception.php'; throw new Zend_Mime_Exception ( 'Attempt to get a stream from a string part' ) ; } //stream_filter_remove(); // ??? is that right? switch ( $ this -> encoding ) { case Zend_Mime :: ENCODING_QUOTEDPRINTABLE : $ filter = stream_filter_append ( $ this -> _content , 'convert.quoted-printable-encode' , STREAM_FILTER_READ , array ( 'line-length' => 76 , 'line-break-chars' => Zend_Mime :: LINEEND ) ) ; if ( ! is_resource ( $ filter ) ) { // require_once 'Zend/Mime/Exception.php'; throw new Zend_Mime_Exception ( 'Failed to append quoted-printable filter' ) ; } break ; case Zend_Mime :: ENCODING_BASE64 : $ filter = stream_filter_append ( $ this -> _content , 'convert.base64-encode' , STREAM_FILTER_READ , array ( 'line-length' => 76 , 'line-break-chars' => Zend_Mime :: LINEEND ) ) ; if ( ! is_resource ( $ filter ) ) { // require_once 'Zend/Mime/Exception.php'; throw new Zend_Mime_Exception ( 'Failed to append base64 filter' ) ; } break ; default : } return $ this -> _content ; }
docstring: if this was created with a stream, return a filtered stream for
  reading the content. very useful for large file attachments.
  
  @return stream
  @throws Zend_Mime_Exception if not a stream or unable to append filter
docstring_tokens: if this was created with a stream return a filtered stream for reading the content . very useful for large file attachments .