MCPcopy Create free account
hub / github.com/apache/fory / ReadUint32

Method ReadUint32

go/fory/buffer.go:361–370  ·  view source on GitHub ↗

ReadUint32 reads a uint32 and sets error on bounds violation

(err *Error)

Source from the content-addressed store, hash-verified

359
360// ReadUint32 reads a uint32 and sets error on bounds violation
361func (b *ByteBuffer) ReadUint32(err *Error) uint32 {
362 if b.readerIndex+4 > len(b.data) {
363 if !b.fill(4, err) {
364 return 0
365 }
366 }
367 i := binary.LittleEndian.Uint32(b.data[b.readerIndex:])
368 b.readerIndex += 4
369 return i
370}
371
372// ReadUint64 reads a uint64 and sets error on bounds violation
373func (b *ByteBuffer) ReadUint64(err *Error) uint64 {

Callers 11

ReadInt32Method · 0.95
ReadFloat32Method · 0.95
ReadDataMethod · 0.80
readNumericValueByTypeIDFunction · 0.80
readDirectIntegerScalarFunction · 0.80
readRemainingFieldMethod · 0.80
readOptionFastFunction · 0.80
readFieldsInOrderMethod · 0.80
ReadDataMethod · 0.80
skipValueFunction · 0.80

Calls 1

fillMethod · 0.95

Tested by

no test coverage detected