ReadUint16 reads a uint16 and sets error on bounds violation
(err *Error)
| 347 | |
| 348 | // ReadUint16 reads a uint16 and sets error on bounds violation |
| 349 | func (b *ByteBuffer) ReadUint16(err *Error) uint16 { |
| 350 | if b.readerIndex+2 > len(b.data) { |
| 351 | if !b.fill(2, err) { |
| 352 | return 0 |
| 353 | } |
| 354 | } |
| 355 | v := binary.LittleEndian.Uint16(b.data[b.readerIndex:]) |
| 356 | b.readerIndex += 2 |
| 357 | return v |
| 358 | } |
| 359 | |
| 360 | // ReadUint32 reads a uint32 and sets error on bounds violation |
| 361 | func (b *ByteBuffer) ReadUint32(err *Error) uint32 { |
no test coverage detected