Bytes returns all written bytes from the buffer (from 0 to writerIndex).
()
| 471 | |
| 472 | // Bytes returns all written bytes from the buffer (from 0 to writerIndex). |
| 473 | func (b *ByteBuffer) Bytes() []byte { |
| 474 | return b.GetByteSlice(0, b.writerIndex) |
| 475 | } |
| 476 | |
| 477 | func (b *ByteBuffer) SetWriterIndex(index int) { |
| 478 | b.writerIndex = index |