public function setWriteBuffer($size)
    {
        if (!is_resource($this->fp)) {
            return $this->raiseError('not connected');
        }

        $returned = stream_set_write_buffer($this->fp, $size);
        if ($returned === 0) {
            return true;
        }

        return $this->raiseError('Cannot set write buffer.');
    }