code: public function write($string)
      {
          if (! $this->isWritable()) {
              $message = 'Stream is not writable';
  
              throw new \RuntimeException($message);
          }
  
          $this->size = null;
  
          return fwrite($this->stream, $string);
      }
docs: Write data to the stream.
  
  @param  string $string
  @return integer
  
  @throws \RuntimeException