original_string: public function add($data, $reset = false)
      {
          if ($reset) {
              $pos = $this->pos();
          }
  
          if (is_resource($data)) {
              $dpos = ftell($data);
              while (!feof($data)) {
                  $this->add(fread($data, 8192));
              }
              fseek($data, $dpos);
          } elseif ($data instanceof Horde_Stream) {
              $dpos = $data->pos();
              while (!$data->eof()) {
                  $this->add($data->substring(0, 65536));
              }
              $data->seek($dpos, false);
          } else {
              fwrite($this->stream, $data);
          }
  
          if ($reset) {
              $this->seek($pos, false);
          }
      }
code: public function add($data, $reset = false)
      {
          if ($reset) {
              $pos = $this->pos();
          }
  
          if (is_resource($data)) {
              $dpos = ftell($data);
              while (!feof($data)) {
                  $this->add(fread($data, 8192));
              }
              fseek($data, $dpos);
          } elseif ($data instanceof Horde_Stream) {
              $dpos = $data->pos();
              while (!$data->eof()) {
                  $this->add($data->substring(0, 65536));
              }
              $data->seek($dpos, false);
          } else {
              fwrite($this->stream, $data);
          }
  
          if ($reset) {
              $this->seek($pos, false);
          }
      }
code_tokens: public function add ( $ data , $ reset = false ) { if ( $ reset ) { $ pos = $ this -> pos ( ) ; } if ( is_resource ( $ data ) ) { $ dpos = ftell ( $ data ) ; while ( ! feof ( $ data ) ) { $ this -> add ( fread ( $ data , 8192 ) ) ; } fseek ( $ data , $ dpos ) ; } elseif ( $ data instanceof Horde_Stream ) { $ dpos = $ data -> pos ( ) ; while ( ! $ data -> eof ( ) ) { $ this -> add ( $ data -> substring ( 0 , 65536 ) ) ; } $ data -> seek ( $ dpos , false ) ; } else { fwrite ( $ this -> stream , $ data ) ; } if ( $ reset ) { $ this -> seek ( $ pos , false ) ; } }
docstring: Adds data to the stream.
  
  @param mixed $data     Data to add to the stream. Can be a resource,
  Horde_Stream object, or a string(-ish) value.
  @param boolean $reset  Reset stream pointer to initial position after
  adding?
docstring_tokens: Adds data to the stream .