WriteTo implements io.WriterTo.
(w io.Writer)
| 57 | |
| 58 | // WriteTo implements io.WriterTo. |
| 59 | func (b *ByteBuffer) WriteTo(w io.Writer) (int64, error) { |
| 60 | n, err := w.Write(b.B) |
| 61 | return int64(n), err |
| 62 | } |
| 63 | |
| 64 | // Bytes returns b.B, i.e. all the bytes accumulated in the buffer. |
| 65 | // |