func (r *Response) SetWriter(w io.Writer) {
	r.writer = w
}
SetWriter implements `engine.Response#SetWriter` function.
package fasthttp
import (
	"io"
	"net/http"
	"github.com/labstack/echo/engine"
	"github.com/labstack/echo/log"
	"github.com/valyala/fasthttp"
)
type (
	Response struct {
		*fasthttp.RequestCtx
		header    engine.Header
		status    int
		size      int64
		committed bool
		writer    io.Writer
		logger    log.Logger
	}
)
func NewResponse(c *fasthttp.RequestCtx, l log.Logger) *Response {
	return &Response{
		RequestCtx: c,
		header:     &ResponseHeader{ResponseHeader: &c.Response.Header},
		writer:     c,
		logger:     l,
	}
}
func (r *Response) Header() engine.Header {
	return r.header
}
func (r *Response) WriteHeader(code int) {
	if r.committed {
		r.logger.Warn("response already committed")
		return
	}
	r.status = code
	r.SetStatusCode(code)
	r.committed = true
}
func (r *Response) Write(b []byte) (n int, err error) {
	if !r.committed {
		r.WriteHeader(http.StatusOK)
	}
	n, err = r.writer.Write(b)
	r.size += int64(n)
	return
}
func (r *Response) SetCookie(c engine.Cookie) {
	cookie := new(fasthttp.Cookie)
	cookie.SetKey(c.Name())
	cookie.SetValue(c.Value())
	cookie.SetPath(c.Path())
	cookie.SetDomain(c.Domain())
	cookie.SetExpire(c.Expires())
	cookie.SetSecure(c.Secure())
	cookie.SetHTTPOnly(c.HTTPOnly())
	r.Response.Header.SetCookie(cookie)
}
func (r *Response) Status() int {
	return r.status
}
func (r *Response) Size() int64 {
	return r.size
}
func (r *Response) Committed() bool {
	return r.committed
}
func (r *Response) Writer() io.Writer {
	return r.writer
}