ReadInt8 reads an int8 and sets error on bounds violation
(err *Error)
| 323 | |
| 324 | // ReadInt8 reads an int8 and sets error on bounds violation |
| 325 | func (b *ByteBuffer) ReadInt8(err *Error) int8 { |
| 326 | if b.readerIndex+1 > len(b.data) { |
| 327 | if !b.fill(1, err) { |
| 328 | return 0 |
| 329 | } |
| 330 | } |
| 331 | v := int8(b.data[b.readerIndex]) |
| 332 | b.readerIndex++ |
| 333 | return v |
| 334 | } |
| 335 | |
| 336 | // ReadInt16 reads an int16 and sets error on bounds violation |
| 337 | func (b *ByteBuffer) ReadInt16(err *Error) int16 { |