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

Method ReadByte

go/fory/buffer.go:313–322  ·  view source on GitHub ↗

ReadByte reads a byte and sets error on bounds violation

(err *Error)

Source from the content-addressed store, hash-verified

311
312// ReadByte reads a byte and sets error on bounds violation
313func (b *ByteBuffer) ReadByte(err *Error) byte {
314 if b.readerIndex+1 > len(b.data) {
315 if !b.fill(1, err) {
316 return 0
317 }
318 }
319 v := b.data[b.readerIndex]
320 b.readerIndex++
321 return v
322}
323
324// ReadInt8 reads an int8 and sets error on bounds violation
325func (b *ByteBuffer) ReadInt8(err *Error) int8 {

Callers 15

TestVarintFunction · 0.95
requireRootTypeIDFunction · 0.95
TestDecimalWireEncodingFunction · 0.95
decodeTypeDefFunction · 0.95
testBufferFunction · 0.95
readMetaStringMethod · 0.45
ReadMetaStringBytesMethod · 0.45
readVarUint32EFunction · 0.45

Calls 1

fillMethod · 0.95